summaryrefslogtreecommitdiff
path: root/src/clock.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2011-04-19 23:22:19 -0700
committerMarcel Holtmann <marcel@holtmann.org>2011-04-19 23:22:19 -0700
commit2f57ae0efc03b1a752470de7e19f538d18e57469 (patch)
tree7e5ed6e8aa777329eb17c16c38aeebcaf6e9db2a /src/clock.c
parentb3cc6882f77a988373007f315be82b738803d60f (diff)
downloadconnman-2f57ae0efc03b1a752470de7e19f538d18e57469.tar.gz
connman-2f57ae0efc03b1a752470de7e19f538d18e57469.tar.bz2
connman-2f57ae0efc03b1a752470de7e19f538d18e57469.zip
clock: Add skeleton for timezone change function
Diffstat (limited to 'src/clock.c')
-rw-r--r--src/clock.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/clock.c b/src/clock.c
index 1a1dfe88..7b3e8701 100644
--- a/src/clock.c
+++ b/src/clock.c
@@ -211,6 +211,19 @@ static DBusMessage *set_property(DBusConnection *conn,
connman_dbus_property_changed_basic(CONNMAN_MANAGER_PATH,
CONNMAN_CLOCK_INTERFACE, "TimeUpdates",
DBUS_TYPE_STRING, &strval);
+ } else if (g_str_equal(name, "Timezone") == TRUE) {
+ const char *strval;
+
+ if (type != DBUS_TYPE_STRING)
+ return __connman_error_invalid_arguments(msg);
+
+ if (timezone_updates_config != TIMEZONE_UPDATES_MANUAL)
+ return __connman_error_permission_denied(msg);
+
+ dbus_message_iter_get_basic(&value, &strval);
+
+ if (__connman_timezone_change(strval) < 0)
+ return __connman_error_invalid_arguments(msg);
} else if (g_str_equal(name, "TimezoneUpdates") == TRUE) {
const char *strval;
enum timezone_updates newval;