summaryrefslogtreecommitdiff
path: root/plugins/datetime/gsd-datetime-mechanism.h
diff options
context:
space:
mode:
authorPerberos <[email protected]>2011-12-01 23:53:21 -0300
committerPerberos <[email protected]>2011-12-01 23:53:21 -0300
commit505cabbd3036081f26586cabc64c26e7769c0ec9 (patch)
tree09e0498bf572128f5c9ab551531cb28d6d75e992 /plugins/datetime/gsd-datetime-mechanism.h
downloadmate-settings-daemon-505cabbd3036081f26586cabc64c26e7769c0ec9.tar.bz2
mate-settings-daemon-505cabbd3036081f26586cabc64c26e7769c0ec9.tar.xz
moving from https://github.com/perberos/mate-desktop-environment
Diffstat (limited to 'plugins/datetime/gsd-datetime-mechanism.h')
-rw-r--r--plugins/datetime/gsd-datetime-mechanism.h101
1 files changed, 101 insertions, 0 deletions
diff --git a/plugins/datetime/gsd-datetime-mechanism.h b/plugins/datetime/gsd-datetime-mechanism.h
new file mode 100644
index 0000000..52b3b02
--- /dev/null
+++ b/plugins/datetime/gsd-datetime-mechanism.h
@@ -0,0 +1,101 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2007 David Zeuthen <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef GSD_DATETIME_MECHANISM_H
+#define GSD_DATETIME_MECHANISM_H
+
+#include <glib-object.h>
+#include <dbus/dbus-glib.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define GSD_DATETIME_TYPE_MECHANISM (gsd_datetime_mechanism_get_type ())
+#define GSD_DATETIME_MECHANISM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_DATETIME_TYPE_MECHANISM, GsdDatetimeMechanism))
+#define GSD_DATETIME_MECHANISM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_DATETIME_TYPE_MECHANISM, GsdDatetimeMechanismClass))
+#define GSD_DATETIME_IS_MECHANISM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_DATETIME_TYPE_MECHANISM))
+#define GSD_DATETIME_IS_MECHANISM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_DATETIME_TYPE_MECHANISM))
+#define GSD_DATETIME_MECHANISM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_DATETIME_TYPE_MECHANISM, GsdDatetimeMechanismClass))
+
+typedef struct GsdDatetimeMechanismPrivate GsdDatetimeMechanismPrivate;
+
+typedef struct
+{
+ GObject parent;
+ GsdDatetimeMechanismPrivate *priv;
+} GsdDatetimeMechanism;
+
+typedef struct
+{
+ GObjectClass parent_class;
+} GsdDatetimeMechanismClass;
+
+typedef enum
+{
+ GSD_DATETIME_MECHANISM_ERROR_GENERAL,
+ GSD_DATETIME_MECHANISM_ERROR_NOT_PRIVILEGED,
+ GSD_DATETIME_MECHANISM_ERROR_INVALID_TIMEZONE_FILE,
+ GSD_DATETIME_MECHANISM_NUM_ERRORS
+} GsdDatetimeMechanismError;
+
+#define GSD_DATETIME_MECHANISM_ERROR gsd_datetime_mechanism_error_quark ()
+
+GType gsd_datetime_mechanism_error_get_type (void);
+#define GSD_DATETIME_MECHANISM_TYPE_ERROR (gsd_datetime_mechanism_error_get_type ())
+
+
+GQuark gsd_datetime_mechanism_error_quark (void);
+GType gsd_datetime_mechanism_get_type (void);
+GsdDatetimeMechanism *gsd_datetime_mechanism_new (void);
+
+/* exported methods */
+gboolean gsd_datetime_mechanism_get_timezone (GsdDatetimeMechanism *mechanism,
+ DBusGMethodInvocation *context);
+gboolean gsd_datetime_mechanism_set_timezone (GsdDatetimeMechanism *mechanism,
+ const char *zone_file,
+ DBusGMethodInvocation *context);
+
+gboolean gsd_datetime_mechanism_can_set_timezone (GsdDatetimeMechanism *mechanism,
+ DBusGMethodInvocation *context);
+
+gboolean gsd_datetime_mechanism_set_time (GsdDatetimeMechanism *mechanism,
+ gint64 seconds_since_epoch,
+ DBusGMethodInvocation *context);
+
+gboolean gsd_datetime_mechanism_can_set_time (GsdDatetimeMechanism *mechanism,
+ DBusGMethodInvocation *context);
+
+gboolean gsd_datetime_mechanism_adjust_time (GsdDatetimeMechanism *mechanism,
+ gint64 seconds_to_add,
+ DBusGMethodInvocation *context);
+
+gboolean gsd_datetime_mechanism_get_hardware_clock_using_utc (GsdDatetimeMechanism *mechanism,
+ DBusGMethodInvocation *context);
+
+gboolean gsd_datetime_mechanism_set_hardware_clock_using_utc (GsdDatetimeMechanism *mechanism,
+ gboolean using_utc,
+ DBusGMethodInvocation *context);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GSD_DATETIME_MECHANISM_H */