aboutsummaryrefslogtreecommitdiff
path: root/src/status-provider.h
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-06-11 12:06:09 -0500
committerTed Gould <ted@canonical.com>2009-06-11 12:06:09 -0500
commitbac4397f4f402d3588b9fb6153bab8e6f320f8b7 (patch)
treeef482717119715f9787ba298ddcecb563322cc0c /src/status-provider.h
parent9b6dcf5696d59e6b6004b8631f4a136f5b90c1d5 (diff)
downloadayatana-indicator-session-bac4397f4f402d3588b9fb6153bab8e6f320f8b7.tar.gz
ayatana-indicator-session-bac4397f4f402d3588b9fb6153bab8e6f320f8b7.tar.bz2
ayatana-indicator-session-bac4397f4f402d3588b9fb6153bab8e6f320f8b7.zip
Moving the enum into the provider object and changing the name everywhere.
Diffstat (limited to 'src/status-provider.h')
-rw-r--r--src/status-provider.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/status-provider.h b/src/status-provider.h
index bbc86f6..b20f4f0 100644
--- a/src/status-provider.h
+++ b/src/status-provider.h
@@ -13,6 +13,18 @@ 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 enum
+{
+ STATUS_PROVIDER_STATUS_ONLINE,
+ STATUS_PROVIDER_STATUS_AWAY,
+ STATUS_PROVIDER_STATUS_DND,
+ STATUS_PROVIDER_STATUS_INVISIBLE,
+ STATUS_PROVIDER_STATUS_OFFLINE,
+ /* Leave as last */
+ STATUS_PROVIDER_STATUS_LAST
+}
+StatusProviderStatus;
+
#define STATUS_PROVIDER_SIGNAL_STATUS_CHANGED "status-changed"
typedef struct _StatusProvider StatusProvider;
@@ -23,21 +35,21 @@ struct _StatusProvider {
typedef struct _StatusProviderClass StatusProviderClass;
struct _StatusProviderClass {
/* Signals */
- void (*status_changed) (guint newstatus);
+ void (*status_changed) (StatusProviderStatus newstatus);
/* Virtual Functions */
- void (*set_status) (StatusProvider * sp, guint newstatus);
- guint (*get_status) (StatusProvider * sp);
+ void (*set_status) (StatusProvider * sp, StatusProviderStatus newstatus);
+ StatusProviderStatus (*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_set_status (StatusProvider * sp, StatusProviderStatus status);
+StatusProviderStatus status_provider_get_status (StatusProvider * sp);
-void status_provider_emit_status_changed (StatusProvider * sp, guint newstatus);
+void status_provider_emit_status_changed (StatusProvider * sp, StatusProviderStatus newstatus);
G_END_DECLS