aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-06-11 12:01:59 -0500
committerTed Gould <ted@canonical.com>2009-06-11 12:01:59 -0500
commit9b6dcf5696d59e6b6004b8631f4a136f5b90c1d5 (patch)
tree8ded50a5a78d6c4705fc9edd58303fda09b91fab
parent3fc5dff1de2389211bae97ba54db3c1370dbab0c (diff)
downloadayatana-indicator-session-9b6dcf5696d59e6b6004b8631f4a136f5b90c1d5.tar.gz
ayatana-indicator-session-9b6dcf5696d59e6b6004b8631f4a136f5b90c1d5.tar.bz2
ayatana-indicator-session-9b6dcf5696d59e6b6004b8631f4a136f5b90c1d5.zip
Providing the first hints at an API
-rw-r--r--src/status-provider.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/status-provider.h b/src/status-provider.h
index 7d36f02..bbc86f6 100644
--- a/src/status-provider.h
+++ b/src/status-provider.h
@@ -13,19 +13,32 @@ G_BEGIN_DECLS
#define IS_STATUS_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), STATUS_PROVIDER_TYPE))
#define STATUS_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), STATUS_PROVIDER_TYPE, StatusProviderClass))
-
-typedef struct _StatusProviderClass StatusProviderClass;
-struct _StatusProviderClass {
- GObjectClass parent_class;
-};
+#define STATUS_PROVIDER_SIGNAL_STATUS_CHANGED "status-changed"
typedef struct _StatusProvider StatusProvider;
struct _StatusProvider {
GObject parent;
};
+typedef struct _StatusProviderClass StatusProviderClass;
+struct _StatusProviderClass {
+ /* Signals */
+ void (*status_changed) (guint newstatus);
+
+ /* Virtual Functions */
+ void (*set_status) (StatusProvider * sp, guint newstatus);
+ guint (*get_status) (StatusProvider * sp);
+
+ GObjectClass parent_class;
+};
+
GType status_provider_get_type (void);
+void status_provider_set_status (StatusProvider * sp, guint status);
+guint status_provider_get_status (StatusProvider * sp);
+
+void status_provider_emit_status_changed (StatusProvider * sp, guint newstatus);
+
G_END_DECLS
#endif