From fc1e08a7c7873005d9161da2ea677908d07f3fcc Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 30 Nov 2009 09:52:16 -0600 Subject: Total insane rename. Probably broke more than a few things. --- src/application-service.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 src/application-service.c (limited to 'src/application-service.c') diff --git a/src/application-service.c b/src/application-service.c new file mode 100644 index 0000000..5bd9b96 --- /dev/null +++ b/src/application-service.c @@ -0,0 +1,56 @@ + +#include "libindicator/indicator-service.h" +#include "notification-item-client.h" +#include "custom-service-appstore.h" +#include "custom-service-watcher.h" +#include "dbus-shared.h" + +/* The base main loop */ +static GMainLoop * mainloop = NULL; +/* Where the application registry lives */ +static CustomServiceAppstore * appstore = NULL; +/* Interface for applications */ +static CustomServiceWatcher * watcher = NULL; +/* The service management interface */ +static IndicatorService * service = NULL; + +/* Recieves the disonnection signal from the service + object and closes the mainloop. */ +static void +service_disconnected (IndicatorService * service, gpointer data) +{ + g_debug("Service disconnected"); + if (mainloop != NULL) { + g_main_loop_quit(mainloop); + } + return; +} + +/* Builds up the core objects and puts us spinning into + a main loop. */ +int +main (int argc, char ** argv) +{ + g_type_init(); + + /* Bring us up as a basic indicator service */ + service = indicator_service_new(INDICATOR_CUSTOM_DBUS_ADDR); + g_signal_connect(G_OBJECT(service), "disconnected", G_CALLBACK(service_disconnected), NULL); + + /* Building our app store */ + appstore = CUSTOM_SERVICE_APPSTORE(g_object_new(CUSTOM_SERVICE_APPSTORE_TYPE, NULL)); + + /* Adding a watcher for the Apps coming up */ + watcher = custom_service_watcher_new(appstore); + + /* Building and executing our main loop */ + mainloop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(mainloop); + + /* Unref'ing all the objects */ + g_object_unref(G_OBJECT(watcher)); + g_object_unref(G_OBJECT(appstore)); + g_object_unref(G_OBJECT(service)); + + return 0; +} -- cgit v1.2.3 From 5b2dcab7aad9e2920bedc3ef28c34c661d70ce71 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 30 Nov 2009 09:58:53 -0600 Subject: Changing file names, and some fallouts from that. --- src/application-service.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/application-service.c') diff --git a/src/application-service.c b/src/application-service.c index 5bd9b96..6d5f44d 100644 --- a/src/application-service.c +++ b/src/application-service.c @@ -1,8 +1,8 @@ #include "libindicator/indicator-service.h" #include "notification-item-client.h" -#include "custom-service-appstore.h" -#include "custom-service-watcher.h" +#include "application-service-appstore.h" +#include "application-service-watcher.h" #include "dbus-shared.h" /* The base main loop */ -- cgit v1.2.3 From 672b7258707f3508ca4abe5fd1adee3847af5f94 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 30 Nov 2009 12:34:53 -0600 Subject: Massive custom to application find and replace throughout the code. --- src/application-service.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/application-service.c') diff --git a/src/application-service.c b/src/application-service.c index 6d5f44d..56e3e80 100644 --- a/src/application-service.c +++ b/src/application-service.c @@ -8,9 +8,9 @@ /* The base main loop */ static GMainLoop * mainloop = NULL; /* Where the application registry lives */ -static CustomServiceAppstore * appstore = NULL; +static ApplicationServiceAppstore * appstore = NULL; /* Interface for applications */ -static CustomServiceWatcher * watcher = NULL; +static ApplicationServiceWatcher * watcher = NULL; /* The service management interface */ static IndicatorService * service = NULL; @@ -34,14 +34,14 @@ main (int argc, char ** argv) g_type_init(); /* Bring us up as a basic indicator service */ - service = indicator_service_new(INDICATOR_CUSTOM_DBUS_ADDR); + service = indicator_service_new(INDICATOR_APPLICATION_DBUS_ADDR); g_signal_connect(G_OBJECT(service), "disconnected", G_CALLBACK(service_disconnected), NULL); /* Building our app store */ - appstore = CUSTOM_SERVICE_APPSTORE(g_object_new(CUSTOM_SERVICE_APPSTORE_TYPE, NULL)); + appstore = APPLICATION_SERVICE_APPSTORE(g_object_new(APPLICATION_SERVICE_APPSTORE_TYPE, NULL)); /* Adding a watcher for the Apps coming up */ - watcher = custom_service_watcher_new(appstore); + watcher = application_service_watcher_new(appstore); /* Building and executing our main loop */ mainloop = g_main_loop_new(NULL, FALSE); -- cgit v1.2.3