diff options
author | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-19 23:24:27 +0000 |
---|---|---|
committer | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-19 23:24:27 +0000 |
commit | 77f799ff1eab72ca12a0b89f48f7b4907c44e2be (patch) | |
tree | b7dc4ff6bdbb84391b8b226995daa5bb8fbde8b9 /include/asterisk/app.h | |
parent | 5bc0b2d273087883a17b7804240030a322292279 (diff) |
After some study, thought, comparing, etc. I've backed out the previous universal mod to make ast_flags a 64 bit thing. Instead, I added a 64-bit version of ast_flags (ast_flags64), and 64-bit versions of the test-flag, set-flag, etc. macros, and an app_parse_options64 routine, and I use these in app_dial alone, to eliminate the 30-option limit it had grown to meet. There is room now for 32 more options and flags. I was heavily tempted to implement some of the other ideas that were presented, but this solution does not intro any new versions of dial, doesn't have a different API, has a minimal/zero impact on code outside of dial, and doesn't seriously (I hope) affect the code structure of dial. It's the best I can think of right now. My goal was NOT to rewrite dial. I leave that to a future, coordinated effort.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75983 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/app.h')
-rw-r--r-- | include/asterisk/app.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/asterisk/app.h b/include/asterisk/app.h index 76683d5eb..1fb0e04eb 100644 --- a/include/asterisk/app.h +++ b/include/asterisk/app.h @@ -425,6 +425,17 @@ struct ast_app_option { */ int ast_app_parse_options(const struct ast_app_option *options, struct ast_flags *flags, char **args, char *optstr); + /*! + \brief Parses a string containing application options and sets flags/arguments. + \param options The array of possible options declared with AST_APP_OPTIONS + \param flags The 64-bit flag structure to have option flags set + \param args The array of argument pointers to hold arguments found + \param optstr The string containing the options to be parsed + \return zero for success, non-zero if an error occurs + \sa AST_APP_OPTIONS + */ +int ast_app_parse_options64(const struct ast_app_option *options, struct ast_flags64 *flags, char **args, char *optstr); + /*! \brief Present a dialtone and collect a certain length extension. \return Returns 1 on valid extension entered, -1 on hangup, or 0 on invalid extension. \note Note that if 'collect' holds digits already, new digits will be appended, so be sure it's initialized properly */ |