00001 /* 00002 * This file is part of contentLister. 00003 * 00004 * contentLister is free software: you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation, either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * contentLister is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 */ 00017 00026 /* contentLister - A GTK based content lister (read only) application on the eReader platform 00027 * Copyright (C) 2007-2008 iRex Technologies B.V. 00028 * 00029 */ 00030 #ifndef __TIMED_IDS__H__ 00031 #define __TIMED_IDS__H__ 00032 00033 #define TZ_FILE "/etc/localtime" 00034 00035 typedef enum 00036 { 00037 connect_after_wakeup, 00038 connect_when_running, 00039 connect_undefined 00040 }timedids_connect_reason; 00041 00042 // Header of timezone files, you can find them in /usr/share/zoneinfo 00043 struct tzhead 00044 { 00045 char tzh_magic[4]; /* TZ_MAGIC */ 00046 char tzh_reserved[16]; /* reserved for future use */ 00047 char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */ 00048 char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */ 00049 char tzh_leapcnt[4]; /* coded number of leap seconds */ 00050 char tzh_timecnt[4]; /* coded number of transition times */ 00051 char tzh_typecnt[4]; /* coded number of local time types */ 00052 char tzh_charcnt[4]; /* coded number of abbr. chars */ 00053 }; 00054 00055 #ifdef __cplusplus 00056 extern "C" 00057 { 00058 #endif /* __cplusplus */ 00059 00060 void timed_ids_init(); 00061 void timed_ids_final(); 00062 00063 gboolean on_timedids_connect_after_wakeup(gpointer p); 00064 00065 void timed_ids_handle_connmgr_quit(); 00066 void timed_ids_handle_reread_settings(); 00067 void timed_ids_handle_recreate_timer(gint interval); 00068 timedids_connect_reason get_timedids_connect_reason(); 00069 void set_timedids_connect_reason(timedids_connect_reason connReason); 00070 00071 #ifdef __cplusplus 00072 } 00073 #endif //* __cplusplus */ 00074 00075 #endif //__TIMED_IDS__H__