datetime: add a function to retrieve current timezone from dbus
Add get_system_timezone_async function to request the current timezone from the SettingsDaemon.DateTimeMechanism dbus object.
This commit is contained in:
parent
8db6536da9
commit
8174f22fe7
2 changed files with 99 additions and 0 deletions
|
@ -20,9 +20,18 @@
|
|||
|
||||
#ifndef __SET_SYSTEM_TIMEZONE_H__
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <glib.h>
|
||||
#include <time.h>
|
||||
|
||||
typedef void (*GetTimezoneFunc) (gpointer data,
|
||||
const gchar *timezone,
|
||||
GError *error);
|
||||
void get_system_timezone_async (GetTimezoneFunc callback,
|
||||
gpointer data,
|
||||
GDestroyNotify notify);
|
||||
|
||||
gint can_set_system_timezone (void);
|
||||
|
||||
gint can_set_system_time (void);
|
||||
|
@ -37,4 +46,12 @@ void set_system_timezone_async (const gchar *filename,
|
|||
gpointer data,
|
||||
GDestroyNotify notify);
|
||||
|
||||
|
||||
|
||||
#ifdef HAVE_SOLARIS
|
||||
#define SYSTEM_ZONEINFODIR "/usr/share/lib/zoneinfo/tab"
|
||||
#else
|
||||
#define SYSTEM_ZONEINFODIR "/usr/share/zoneinfo"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue