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: https://origsvn.digium.com/svn/asterisk/trunk@164976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2008-12-16 22:57:17 +00:00
parent 91b4a30be8
commit 27cbfc1bd5
7 changed files with 192 additions and 131 deletions

View File

@@ -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) */