diff options
author | Ted Gould <ted@canonical.com> | 2009-10-29 09:27:05 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-10-29 09:27:05 -0500 |
commit | ba8af8211f01a5c470ac30275e907bc5a26be910 (patch) | |
tree | f7f07456e3676e8c247420347c1c9ae98fd3cab2 | |
parent | 606b4939df9845c82d92029abfe8403eb891a26b (diff) | |
download | libayatana-indicator-ba8af8211f01a5c470ac30275e907bc5a26be910.tar.gz libayatana-indicator-ba8af8211f01a5c470ac30275e907bc5a26be910.tar.bz2 libayatana-indicator-ba8af8211f01a5c470ac30275e907bc5a26be910.zip |
Putting in some templated objects.
-rw-r--r-- | .bzrignore | 2 | ||||
-rw-r--r-- | libindicator/Makefile.am | 8 | ||||
-rw-r--r-- | libindicator/indicator-service-manager.c | 57 | ||||
-rw-r--r-- | libindicator/indicator-service-manager.h | 32 | ||||
-rw-r--r-- | libindicator/indicator-service.c | 58 | ||||
-rw-r--r-- | libindicator/indicator-service.h | 33 |
6 files changed, 188 insertions, 2 deletions
@@ -119,3 +119,5 @@ libindicator-[0-9].[0-9].[0-9].tar.gz libindicator-[0-9].[0-9].[0-9].tar.gz.asc libindicator/indicator-service-client.h libindicator/indicator-service-server.h +libindicator/libindicator_la-indicator-service.lo +libindicator/libindicator_la-indicator-service-manager.lo diff --git a/libindicator/Makefile.am b/libindicator/Makefile.am index 6061ad8..cce87ca 100644 --- a/libindicator/Makefile.am +++ b/libindicator/Makefile.am @@ -7,7 +7,9 @@ libindicatorincludedir=$(includedir)/libindicator-0.1/libindicator indicator_headers = \ indicator.h \ - indicator-object.h + indicator-object.h \ + indicator-service.h \ + indicator-service-manager.h libindicatorinclude_HEADERS = \ $(indicator_headers) @@ -17,7 +19,9 @@ lib_LTLIBRARIES = \ libindicator_la_SOURCES = \ $(indicator_headers) \ - indicator-object.c + indicator-object.c \ + indicator-service.c \ + indicator-service-manager.c libindicator_la_CFLAGS = \ $(LIBINDICATOR_CFLAGS) \ diff --git a/libindicator/indicator-service-manager.c b/libindicator/indicator-service-manager.c new file mode 100644 index 0000000..6fd9a5b --- /dev/null +++ b/libindicator/indicator-service-manager.c @@ -0,0 +1,57 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "indicator-service-manager.h" + +typedef struct _IndicatorServiceManagerPrivate IndicatorServiceManagerPrivate; +struct _IndicatorServiceManagerPrivate { + int dummy; +}; + +#define INDICATOR_SERVICE_MANAGER_GET_PRIVATE(o) \ +(G_TYPE_INSTANCE_GET_PRIVATE ((o), INDICATOR_SERVICE_MANAGER_TYPE, IndicatorServiceManagerPrivate)) + +static void indicator_service_manager_class_init (IndicatorServiceManagerClass *klass); +static void indicator_service_manager_init (IndicatorServiceManager *self); +static void indicator_service_manager_dispose (GObject *object); +static void indicator_service_manager_finalize (GObject *object); + +G_DEFINE_TYPE (IndicatorServiceManager, indicator_service_manager, G_TYPE_OBJECT); + +static void +indicator_service_manager_class_init (IndicatorServiceManagerClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + g_type_class_add_private (klass, sizeof (IndicatorServiceManagerPrivate)); + + object_class->dispose = indicator_service_manager_dispose; + object_class->finalize = indicator_service_manager_finalize; + + + return; +} + +static void +indicator_service_manager_init (IndicatorServiceManager *self) +{ + + return; +} + +static void +indicator_service_manager_dispose (GObject *object) +{ + + G_OBJECT_CLASS (indicator_service_manager_parent_class)->dispose (object); + return; +} + +static void +indicator_service_manager_finalize (GObject *object) +{ + + G_OBJECT_CLASS (indicator_service_manager_parent_class)->finalize (object); + return; +} diff --git a/libindicator/indicator-service-manager.h b/libindicator/indicator-service-manager.h new file mode 100644 index 0000000..61c6e64 --- /dev/null +++ b/libindicator/indicator-service-manager.h @@ -0,0 +1,32 @@ +#ifndef __INDICATOR_SERVICE_MANAGER_H__ +#define __INDICATOR_SERVICE_MANAGER_H__ + +#include <glib.h> +#include <glib-object.h> + +G_BEGIN_DECLS + +#define INDICATOR_SERVICE_MANAGER_TYPE (indicator_service_manager_get_type ()) +#define INDICATOR_SERVICE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INDICATOR_SERVICE_MANAGER_TYPE, IndicatorServiceManager)) +#define INDICATOR_SERVICE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), INDICATOR_SERVICE_MANAGER_TYPE, IndicatorServiceManagerClass)) +#define IS_INDICATOR_SERVICE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INDICATOR_SERVICE_MANAGER_TYPE)) +#define IS_INDICATOR_SERVICE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), INDICATOR_SERVICE_MANAGER_TYPE)) +#define INDICATOR_SERVICE_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), INDICATOR_SERVICE_MANAGER_TYPE, IndicatorServiceManagerClass)) + +typedef struct _IndicatorServiceManager IndicatorServiceManager; +typedef struct _IndicatorServiceManagerClass IndicatorServiceManagerClass; + +struct _IndicatorServiceManagerClass { + GObjectClass parent_class; + +}; + +struct _IndicatorServiceManager { + GObject parent; +}; + +GType indicator_service_manager_get_type (void); + +G_END_DECLS + +#endif diff --git a/libindicator/indicator-service.c b/libindicator/indicator-service.c new file mode 100644 index 0000000..089c9ad --- /dev/null +++ b/libindicator/indicator-service.c @@ -0,0 +1,58 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "indicator-service.h" + +typedef struct _IndicatorServicePrivate IndicatorServicePrivate; + +struct _IndicatorServicePrivate { + int dummy; +}; + +#define INDICATOR_SERVICE_GET_PRIVATE(o) \ + (G_TYPE_INSTANCE_GET_PRIVATE ((o), INDICATOR_SERVICE_TYPE, IndicatorServicePrivate)) + +static void indicator_service_class_init (IndicatorServiceClass *klass); +static void indicator_service_init (IndicatorService *self); +static void indicator_service_dispose (GObject *object); +static void indicator_service_finalize (GObject *object); + +G_DEFINE_TYPE (IndicatorService, indicator_service, G_TYPE_OBJECT); + +static void +indicator_service_class_init (IndicatorServiceClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + g_type_class_add_private (klass, sizeof (IndicatorServicePrivate)); + + object_class->dispose = indicator_service_dispose; + object_class->finalize = indicator_service_finalize; + + + return; +} + +static void +indicator_service_init (IndicatorService *self) +{ + + return; +} + +static void +indicator_service_dispose (GObject *object) +{ + + G_OBJECT_CLASS (indicator_service_parent_class)->dispose (object); + return; +} + +static void +indicator_service_finalize (GObject *object) +{ + + G_OBJECT_CLASS (indicator_service_parent_class)->finalize (object); + return; +} diff --git a/libindicator/indicator-service.h b/libindicator/indicator-service.h new file mode 100644 index 0000000..0cec28c --- /dev/null +++ b/libindicator/indicator-service.h @@ -0,0 +1,33 @@ +#ifndef __INDICATOR_SERVICE_H__ +#define __INDICATOR_SERVICE_H__ + +#include <glib.h> +#include <glib-object.h> + +G_BEGIN_DECLS + +#define INDICATOR_SERVICE_TYPE (indicator_service_get_type ()) +#define INDICATOR_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INDICATOR_SERVICE_TYPE, IndicatorService)) +#define INDICATOR_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), INDICATOR_SERVICE_TYPE, IndicatorServiceClass)) +#define IS_INDICATOR_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INDICATOR_SERVICE_TYPE)) +#define IS_INDICATOR_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), INDICATOR_SERVICE_TYPE)) +#define INDICATOR_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), INDICATOR_SERVICE_TYPE, IndicatorServiceClass)) + +typedef struct _IndicatorService IndicatorService; +typedef struct _IndicatorServiceClass IndicatorServiceClass; + +struct _IndicatorServiceClass { + GObjectClass parent_class; + +}; + +struct _IndicatorService { + GObject parent; + +}; + +GType indicator_service_get_type (void); + +G_END_DECLS + +#endif |