diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-16 22:57:17 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-16 22:57:17 +0000 |
commit | 0bb7f0ce940666e28cb30a8e0c8b22f4711e25d9 (patch) | |
tree | 3089c4dfcc98bd2d830466643da0f5f1a65c24f2 /include | |
parent | bfafc90d85624d08d064b68971ff11c96795521f (diff) |
Add timezone to the possible fields in a timespec.
(closes issue #14028)
Reported by: mostyn
Patches:
timezone-v2.patch uploaded by mostyn (license 398)
(with additional code guideline fixes and a memory leak fix by me - license 14)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@164976 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/pbx.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/asterisk/pbx.h b/include/asterisk/pbx.h index 7847bc598..a2ab92592 100644 --- a/include/asterisk/pbx.h +++ b/include/asterisk/pbx.h @@ -119,11 +119,28 @@ struct ast_timing { unsigned int daymask; /*!< Mask for date */ unsigned int dowmask; /*!< Mask for day of week (sun-sat) */ unsigned int minmask[48]; /*!< Mask for minute */ + char *timezone; /*!< NULL, or zoneinfo style timezone */ }; +/*!\brief Construct a timing bitmap, for use in time-based conditionals. + * \param i Pointer to an ast_timing structure. + * \param info Standard string containing a timerange, weekday range, monthday range, and month range, as well as an optional timezone. + * \retval Returns 1 on success or 0 on failure. + */ int ast_build_timing(struct ast_timing *i, const char *info); + +/*!\brief Evaluate a pre-constructed bitmap as to whether the current time falls within the range specified. + * \param i Pointer to an ast_timing structure. + * \retval Returns 1, if the time matches or 0, if the current time falls outside of the specified range. + */ int ast_check_timing(const struct ast_timing *i); +/*!\brief Deallocates memory structures associated with a timing bitmap. + * \param i Pointer to an ast_timing structure. + * \retval Returns 0 on success or a number suitable for passing into strerror, otherwise. + */ +int ast_destroy_timing(struct ast_timing *i); + struct ast_pbx { int dtimeoutms; /*!< Timeout between digits (milliseconds) */ int rtimeoutms; /*!< Timeout for response (milliseconds) */ |