cpl_time.h File Reference

#include <time.h>

Include dependency graph for cpl_time.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _ac_maxval
struct  _ac_tm
struct  _tmrec
struct  _tr_byxxx
struct  _tr_res

Defines

#define FREQ_DAILY   4
#define FREQ_MONTHLY   2
#define FREQ_NOFREQ   0
#define FREQ_WEEKLY   3
#define FREQ_YEARLY   1
#define is_leap_year(yyyy)   ((((yyyy)%400))?(((yyyy)%100)?(((yyyy)%4)?0:1):0):1)
#define TSW_RSET   2
#define TSW_TSET   1
#define WDAY_FR   5
#define WDAY_MO   1
#define WDAY_NU   7
#define WDAY_SA   6
#define WDAY_SU   0
#define WDAY_TH   4
#define WDAY_TU   2
#define WDAY_WE   3

Typedefs

typedef struct _ac_maxvalac_maxval_p
typedef struct _ac_maxval ac_maxval_t
typedef struct _ac_tmac_tm_p
typedef struct _ac_tm ac_tm_t
typedef struct _tmrectmrec_p
typedef struct _tmrec tmrec_t
typedef struct _tr_byxxxtr_byxxx_p
typedef struct _tr_byxxx tr_byxxx_t
typedef struct _tr_restr_res_p
typedef struct _tr_res tr_res_t

Functions

ac_maxval_p ac_get_maxval (ac_tm_p)
int ac_get_mweek (struct tm *)
int ac_get_wkst (void)
int ac_get_yweek (struct tm *)
int ac_print (ac_tm_p)
int ac_tm_free (ac_tm_p)
ac_tm_p ac_tm_new (void)
int ac_tm_reset (ac_tm_p)
int ac_tm_set_time (ac_tm_p, time_t)
int check_tmrec (tmrec_p, ac_tm_p, tr_res_p)
tr_byxxx_p ic_parse_byday (char *)
tr_byxxx_p ic_parse_byxxx (char *)
time_t ic_parse_datetime (char *, struct tm *)
time_t ic_parse_duration (char *)
int ic_parse_wkst (char *)
int tmrec_free (tmrec_p)
tmrec_p tmrec_new (void)
int tr_byxxx_free (tr_byxxx_p)
int tr_byxxx_init (tr_byxxx_p, int)
tr_byxxx_p tr_byxxx_new (void)
int tr_parse_byday (tmrec_p, char *)
int tr_parse_bymday (tmrec_p, char *)
int tr_parse_bymonth (tmrec_p, char *)
int tr_parse_byweekno (tmrec_p, char *)
int tr_parse_byyday (tmrec_p, char *)
int tr_parse_dtend (tmrec_p, char *)
int tr_parse_dtstart (tmrec_p, char *)
int tr_parse_duration (tmrec_p, char *)
int tr_parse_freq (tmrec_p, char *)
int tr_parse_interval (tmrec_p, char *)
int tr_parse_until (tmrec_p, char *)
int tr_parse_wkst (tmrec_p, char *)
int tr_print (tmrec_p)


Define Documentation

#define FREQ_DAILY   4

Definition at line 99 of file cpl_time.h.

Referenced by check_freq_interval(), check_min_unit(), get_min_interval(), and tr_parse_freq().

#define FREQ_MONTHLY   2

#define FREQ_NOFREQ   0

Definition at line 95 of file cpl_time.h.

Referenced by get_min_interval(), and tr_parse_freq().

#define FREQ_WEEKLY   3

Definition at line 98 of file cpl_time.h.

Referenced by check_freq_interval(), check_min_unit(), get_min_interval(), and tr_parse_freq().

#define FREQ_YEARLY   1

#define is_leap_year ( yyyy   )     ((((yyyy)%400))?(((yyyy)%100)?(((yyyy)%4)?0:1):0):1)

Definition at line 51 of file cpl_time.h.

Referenced by ac_get_maxval().

#define TSW_RSET   2

Definition at line 111 of file cpl_time.h.

Referenced by check_min_unit(), and check_tmrec().

#define TSW_TSET   1

Definition at line 110 of file cpl_time.h.

#define WDAY_FR   5

Definition at line 106 of file cpl_time.h.

Referenced by ic_parse_byday(), and ic_parse_wkst().

#define WDAY_MO   1

Definition at line 102 of file cpl_time.h.

Referenced by ic_parse_byday(), and ic_parse_wkst().

#define WDAY_NU   7

Definition at line 108 of file cpl_time.h.

#define WDAY_SA   6

Definition at line 107 of file cpl_time.h.

Referenced by ic_parse_byday(), and ic_parse_wkst().

#define WDAY_SU   0

Definition at line 101 of file cpl_time.h.

Referenced by ic_parse_byday(), and ic_parse_wkst().

#define WDAY_TH   4

Definition at line 105 of file cpl_time.h.

Referenced by ic_parse_byday(), and ic_parse_wkst().

#define WDAY_TU   2

Definition at line 103 of file cpl_time.h.

Referenced by ic_parse_byday(), and ic_parse_wkst().

#define WDAY_WE   3

Definition at line 104 of file cpl_time.h.

Referenced by ic_parse_byday(), and ic_parse_wkst().


Typedef Documentation

typedef struct _ac_maxval * ac_maxval_p

typedef struct _ac_maxval ac_maxval_t

typedef struct _ac_tm * ac_tm_p

typedef struct _ac_tm ac_tm_t

typedef struct _tmrec * tmrec_p

typedef struct _tmrec tmrec_t

typedef struct _tr_byxxx * tr_byxxx_p

typedef struct _tr_byxxx tr_byxxx_t

typedef struct _tr_res * tr_res_p

typedef struct _tr_res tr_res_t


Function Documentation

ac_maxval_p ac_get_maxval ( ac_tm_p   ) 

int ac_get_mweek ( struct tm *   ) 

Definition at line 147 of file cpl_time.c.

Referenced by ac_tm_fill().

int ac_get_wkst ( void   ) 

Definition at line 186 of file cpl_time.c.

int ac_get_yweek ( struct tm *   ) 

Definition at line 158 of file cpl_time.c.

References MON_WEEK.

Referenced by ac_get_maxval(), and ac_tm_fill().

int ac_print ( ac_tm_p   ) 

int ac_tm_free ( ac_tm_p   ) 

Definition at line 203 of file cpl_time.c.

References _ac_tm::mv, and pkg_free.

Referenced by run_time_switch().

ac_tm_p ac_tm_new ( void   ) 

Definition at line 107 of file cpl_time.c.

References NULL, and pkg_malloc.

int ac_tm_reset ( ac_tm_p   ) 

Definition at line 195 of file cpl_time.c.

int ac_tm_set_time ( ac_tm_p  ,
time_t   
)

Definition at line 139 of file cpl_time.c.

References ac_tm_fill(), and _ac_tm::time.

Referenced by run_time_switch().

int check_tmrec ( tmrec_p  _trp,
ac_tm_p  _atp,
tr_res_p  _tsw 
)

return 0/REC_MATCH - the time falls in -1/REC_ERR - error 1/REC_NOMATCH - the time falls out

Definition at line 946 of file cpl_time.c.

References _IS_SET, check_byxxx(), check_freq_interval(), check_min_unit(), _tmrec::dtend, _tmrec::dtstart, _tmrec::duration, _tr_res::flag, REC_ERR, REC_MATCH, REC_NOMATCH, _tr_res::rest, _ac_tm::time, TSW_RSET, and _tmrec::until.

Referenced by run_time_switch().

tr_byxxx_p ic_parse_byday ( char *   ) 

tr_byxxx_p ic_parse_byxxx ( char *   ) 

time_t ic_parse_datetime ( char *  ,
struct tm *   
)

Definition at line 559 of file cpl_time.c.

References _D.

Referenced by tr_parse_dtend(), tr_parse_dtstart(), and tr_parse_until().

time_t ic_parse_duration ( char *   ) 

Definition at line 576 of file cpl_time.c.

Referenced by tr_parse_duration().

int ic_parse_wkst ( char *   ) 

Definition at line 860 of file cpl_time.c.

References WDAY_FR, WDAY_MO, WDAY_SA, WDAY_SU, WDAY_TH, WDAY_TU, and WDAY_WE.

Referenced by tr_parse_wkst().

int tmrec_free ( tmrec_p   ) 

tmrec_p tmrec_new ( void   ) 

Definition at line 353 of file cpl_time.c.

References _tmrec::dtstart, NULL, pkg_malloc, and _tmrec::ts.

int tr_byxxx_free ( tr_byxxx_p   ) 

Definition at line 341 of file cpl_time.c.

References pkg_free, _tr_byxxx::req, and _tr_byxxx::xxx.

Referenced by ic_parse_byday(), ic_parse_byxxx(), and tmrec_free().

int tr_byxxx_init ( tr_byxxx_p  ,
int   
)

Definition at line 319 of file cpl_time.c.

References _tr_byxxx::nr, pkg_free, pkg_malloc, _tr_byxxx::req, and _tr_byxxx::xxx.

Referenced by ic_parse_byday(), and ic_parse_byxxx().

tr_byxxx_p tr_byxxx_new ( void   ) 

Definition at line 309 of file cpl_time.c.

References NULL, and pkg_malloc.

Referenced by ic_parse_byday(), and ic_parse_byxxx().

int tr_parse_byday ( tmrec_p  ,
char *   
)

Definition at line 450 of file cpl_time.c.

References _tmrec::byday, and ic_parse_byday().

Referenced by run_time_switch().

int tr_parse_bymday ( tmrec_p  ,
char *   
)

Definition at line 458 of file cpl_time.c.

References _tmrec::bymday, and ic_parse_byxxx().

Referenced by run_time_switch().

int tr_parse_bymonth ( tmrec_p  ,
char *   
)

Definition at line 474 of file cpl_time.c.

References _tmrec::bymonth, and ic_parse_byxxx().

Referenced by run_time_switch().

int tr_parse_byweekno ( tmrec_p  ,
char *   
)

Definition at line 482 of file cpl_time.c.

References _tmrec::byweekno, and ic_parse_byxxx().

Referenced by run_time_switch().

int tr_parse_byyday ( tmrec_p  ,
char *   
)

Definition at line 466 of file cpl_time.c.

References _tmrec::byyday, and ic_parse_byxxx().

Referenced by run_time_switch().

int tr_parse_dtend ( tmrec_p  ,
char *   
)

Definition at line 387 of file cpl_time.c.

References _tmrec::dtend, and ic_parse_datetime().

Referenced by run_time_switch().

int tr_parse_dtstart ( tmrec_p  ,
char *   
)

Definition at line 379 of file cpl_time.c.

References _tmrec::dtstart, ic_parse_datetime(), and _tmrec::ts.

Referenced by run_time_switch().

int tr_parse_duration ( tmrec_p  ,
char *   
)

Definition at line 396 of file cpl_time.c.

References _tmrec::duration, and ic_parse_duration().

Referenced by run_time_switch().

int tr_parse_freq ( tmrec_p  ,
char *   
)

Definition at line 413 of file cpl_time.c.

References _tmrec::freq, FREQ_DAILY, FREQ_MONTHLY, FREQ_NOFREQ, FREQ_WEEKLY, and FREQ_YEARLY.

Referenced by run_time_switch().

int tr_parse_interval ( tmrec_p  ,
char *   
)

Definition at line 442 of file cpl_time.c.

References _tmrec::interval, and strz2int().

Referenced by run_time_switch().

int tr_parse_until ( tmrec_p  ,
char *   
)

Definition at line 404 of file cpl_time.c.

References ic_parse_datetime(), and _tmrec::until.

Referenced by run_time_switch().

int tr_parse_wkst ( tmrec_p  ,
char *   
)

Definition at line 490 of file cpl_time.c.

References ic_parse_wkst(), and _tmrec::wkst.

Referenced by run_time_switch().

int tr_print ( tmrec_p   ) 


Generated on Mon May 21 18:00:38 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6