diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2008-06-09 22:51:59 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2008-06-09 22:51:59 +0000 |
commit | 53459f86b2df0a2cd655a8c51dccd63073eacb87 (patch) | |
tree | a2740180dd4aac2db0c96b53467d9c9e329df7ff /include/asterisk/config.h | |
parent | a6a6821717ec5ad69188fe4f7a6a12d305c06295 (diff) |
Expand RQ_INTEGER type out to multiple types, one for each precision
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/config.h')
-rw-r--r-- | include/asterisk/config.h | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/include/asterisk/config.h b/include/asterisk/config.h index e1f983dc3..fdcd28a40 100644 --- a/include/asterisk/config.h +++ b/include/asterisk/config.h @@ -28,6 +28,7 @@ extern "C" { #endif #include "asterisk/utils.h" +#include "asterisk/inline_api.h" struct ast_config; @@ -50,7 +51,16 @@ enum { * \brief Types used in ast_realtime_require_field */ typedef enum { - RQ_INTEGER, + RQ_INTEGER1, + RQ_UINTEGER1, + RQ_INTEGER2, + RQ_UINTEGER2, + RQ_INTEGER3, + RQ_UINTEGER3, + RQ_INTEGER4, + RQ_UINTEGER4, + RQ_INTEGER8, + RQ_UINTEGER8, RQ_CHAR, RQ_FLOAT, RQ_DATE, @@ -451,6 +461,27 @@ int ast_parse_arg(const char *arg, enum ast_parse_flags flags, #define CV_DSTR(__x, __dst) CV_F(__x, if (__dst) ast_free(__dst); __dst = ast_strdup(__val)) #define CV_STRFIELD(__x, __obj, __field) CV_F(__x, ast_string_field_set(__obj, __field, __val)) +AST_INLINE_API( +int ast_rq_is_int(require_type type), +{ + switch (type) { + case RQ_INTEGER1: + case RQ_UINTEGER1: + case RQ_INTEGER2: + case RQ_UINTEGER2: + case RQ_INTEGER3: + case RQ_UINTEGER3: + case RQ_INTEGER4: + case RQ_UINTEGER4: + case RQ_INTEGER8: + case RQ_UINTEGER8: + return 1; + default: + return 0; + } +} +) + #if defined(__cplusplus) || defined(c_plusplus) } #endif |