From f8d65da606cc460ebac5f273b754e8885dc91433 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 19 Jan 2010 10:42:11 -0600 Subject: Adding an object to start tracking the lru of the app indicators --- src/Makefile.am | 2 ++ src/application-service-lru-file.c | 56 ++++++++++++++++++++++++++++++++++++++ src/application-service-lru-file.h | 33 ++++++++++++++++++++++ 3 files changed, 91 insertions(+) create mode 100644 src/application-service-lru-file.c create mode 100644 src/application-service-lru-file.h diff --git a/src/Makefile.am b/src/Makefile.am index d9b7963..38e6dd9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -35,6 +35,8 @@ indicator_application_service_SOURCES = \ application-service.c \ application-service-appstore.h \ application-service-appstore.c \ + application-service-lru-file.h \ + application-service-lru-file.c \ application-service-marshal.h \ application-service-marshal.c \ application-service-server.h \ diff --git a/src/application-service-lru-file.c b/src/application-service-lru-file.c new file mode 100644 index 0000000..3cbb1dc --- /dev/null +++ b/src/application-service-lru-file.c @@ -0,0 +1,56 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "application-service-lru-file.h" + +typedef struct _AppLruFilePrivate AppLruFilePrivate; +struct _AppLruFilePrivate { + gint temp; +}; + +#define APP_LRU_FILE_GET_PRIVATE(o) \ + (G_TYPE_INSTANCE_GET_PRIVATE ((o), APP_LRU_FILE_TYPE, AppLruFilePrivate)) + +static void app_lru_file_class_init (AppLruFileClass *klass); +static void app_lru_file_init (AppLruFile *self); +static void app_lru_file_dispose (GObject *object); +static void app_lru_file_finalize (GObject *object); + +G_DEFINE_TYPE (AppLruFile, app_lru_file, G_TYPE_OBJECT); + +static void +app_lru_file_class_init (AppLruFileClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + g_type_class_add_private (klass, sizeof (AppLruFilePrivate)); + + object_class->dispose = app_lru_file_dispose; + object_class->finalize = app_lru_file_finalize; + + return; +} + +static void +app_lru_file_init (AppLruFile *self) +{ + + return; +} + +static void +app_lru_file_dispose (GObject *object) +{ + + G_OBJECT_CLASS (app_lru_file_parent_class)->dispose (object); + return; +} + +static void +app_lru_file_finalize (GObject *object) +{ + + G_OBJECT_CLASS (app_lru_file_parent_class)->finalize (object); + return; +} diff --git a/src/application-service-lru-file.h b/src/application-service-lru-file.h new file mode 100644 index 0000000..6577278 --- /dev/null +++ b/src/application-service-lru-file.h @@ -0,0 +1,33 @@ +#ifndef __APP_LRU_FILE_H__ +#define __APP_LRU_FILE_H__ + +#include +#include + +G_BEGIN_DECLS + +#define APP_LRU_FILE_TYPE (app_lru_file_get_type ()) +#define APP_LRU_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), APP_LRU_FILE_TYPE, AppLruFile)) +#define APP_LRU_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), APP_LRU_FILE_TYPE, AppLruFileClass)) +#define IS_APP_LRU_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), APP_LRU_FILE_TYPE)) +#define IS_APP_LRU_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), APP_LRU_FILE_TYPE)) +#define APP_LRU_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), APP_LRU_FILE_TYPE, AppLruFileClass)) + +typedef struct _AppLruFile AppLruFile; +typedef struct _AppLruFileClass AppLruFileClass; + +struct _AppLruFileClass { + GObjectClass parent_class; + +}; + +struct _AppLruFile { + GObject parent; + +}; + +GType app_lru_file_get_type (void); + +G_END_DECLS + +#endif -- cgit v1.2.3