00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00026 #ifndef __TIME_PERIOD_H
00027 #define __TIME_PERIOD_H
00028 #ifdef __cplusplus
00029 extern "C" {
00030 #endif
00031
00032
00033
00042 typedef struct {
00043 enum {
00044 LIVE=0,
00045 SECOND,
00046 MINUTE,
00047 HOUR,
00048 DAY,
00049 WEEK,
00050 MONTH,
00051 YEAR,
00052 LAST_TIME_PERIOD_T
00053 } type;
00054 int value;
00055 } time_period_t;
00056
00057
00058
00072 char *time_period_get_display_name_type_value (int, int, gboolean);
00073
00074
00075
00086 char *time_period_get_display_name (time_period_t *, gboolean);
00087
00088
00089
00099 time_period_t *time_period_new (int, long);
00100
00101
00102
00109 void time_period_free (time_period_t *);
00110
00111
00112
00121 void time_period_copy (time_period_t *, time_period_t *);
00122
00123
00124
00137 int time_period_cmp (const time_period_t *, const time_period_t *);
00138 #ifdef __cplusplus
00139 }
00140 #endif
00141 #endif