aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/application-service-lru-file.c33
-rw-r--r--src/application-service-lru-file.h4
2 files changed, 37 insertions, 0 deletions
diff --git a/src/application-service-lru-file.c b/src/application-service-lru-file.c
index 3cbb1dc..47cfab9 100644
--- a/src/application-service-lru-file.c
+++ b/src/application-service-lru-file.c
@@ -54,3 +54,36 @@ app_lru_file_finalize (GObject *object)
G_OBJECT_CLASS (app_lru_file_parent_class)->finalize (object);
return;
}
+
+/* API */
+
+/* Simple helper to create a new object */
+AppLruFile *
+app_lru_file_new (void)
+{
+ return APP_LRU_FILE(g_object_new(APP_LRU_FILE_TYPE, NULL));
+}
+
+/* This updates the timestamp for a particular
+ entry in the database. It also queues up a
+ write out of the database. But that'll happen
+ later. */
+void
+app_lru_file_touch (AppLruFile * lrufile, const gchar * id, const gchar * category)
+{
+ g_return_if_fail(IS_APP_LRU_FILE(lrufile));
+ g_return_if_fail(id != NULL && id[0] != '\0');
+ g_return_if_fail(category != NULL && category[0] != '\0');
+
+ return;
+}
+
+/* Used to sort or compare different applications. */
+gint
+app_lru_file_sort (AppLruFile * lrufile, const gchar * id_a, const gchar * id_b)
+{
+ g_return_val_if_fail(IS_APP_LRU_FILE(lrufile), -1);
+
+
+ return 0;
+}
diff --git a/src/application-service-lru-file.h b/src/application-service-lru-file.h
index 6577278..45d3082 100644
--- a/src/application-service-lru-file.h
+++ b/src/application-service-lru-file.h
@@ -28,6 +28,10 @@ struct _AppLruFile {
GType app_lru_file_get_type (void);
+AppLruFile * app_lru_file_new (void);
+void app_lru_file_touch (AppLruFile * lrufile, const gchar * id, const gchar * category);
+gint app_lru_file_sort (AppLruFile * lrufile, const gchar * id_a, const gchar * id_b);
+
G_END_DECLS
#endif