=== modified file 'libnautilus-private/nautilus-file-operations.c'
--- libnautilus-private/nautilus-file-operations.c	2012-02-02 12:48:30 +0000
+++ libnautilus-private/nautilus-file-operations.c	2012-03-08 17:11:49 +0000
@@ -64,6 +64,8 @@
 #include "nautilus-file-utilities.h"
 #include "nautilus-file-conflict-dialog.h"
 
+#include <zeitgeist.h>
+
 /* TODO: TESTING!!! */
 
 typedef struct {
@@ -189,6 +191,104 @@
 #define MERGE_ALL _("Merge _All")
 #define COPY_FORCE _("Copy _Anyway")
 
+#define ZEITGEIST_NAUTILUS_ACTOR "application://nautilus.desktop"
+
+static void
+send_event_to_zeitgeist (ZeitgeistEvent *event)
+{
+    ZeitgeistLog *log = zeitgeist_log_get_default ();
+    zeitgeist_log_insert_events_no_reply (log, event, NULL);
+}
+
+typedef struct {
+    const char *event_interpretation;
+    //char *event_origin;
+    GFile *file;
+    gchar *original_uri; // for MOVE_EVENT
+} _ZeitgeistFileEventData;
+
+static void
+_log_zeitgeist_event_for_file_cb (GObject *source_object,
+        GAsyncResult *res, gpointer user_data)
+{
+    _ZeitgeistFileEventData *data;
+    GError *error;
+    GFileInfo *info;
+    gchar *uri;
+    gchar *origin;
+    const gchar *display_name;
+    const gchar *mimetype;
+    
+    data = user_data;
+
+    error = NULL;
+    info = g_file_query_info_finish (G_FILE (source_object), res, &error);
+
+    if (info) {
+        uri = g_file_get_uri (data->file);
+        origin = g_path_get_dirname (uri);
+        display_name = g_file_info_get_display_name (info);
+        mimetype = g_file_info_get_content_type (info);
+    } else {
+        g_warning ("Error getting info: %s\n", error->message);
+        g_error_free (error);
+        g_object_unref (data->file);
+        g_free (data->original_uri);
+        g_free (data);
+        return; // skip this event
+    }
+
+    ZeitgeistSubject *subject = zeitgeist_subject_new_full (
+        (data->original_uri) ? (data->original_uri) : uri,
+        NULL, // subject interpretation - auto-guess
+        NULL, // suject manifestation - auto-guess
+        mimetype,
+        origin,
+        display_name,
+        NULL // storage - auto-guess
+    );
+
+    if (data->original_uri)
+        zeitgeist_subject_set_current_uri (subject, uri);
+
+    g_free (uri);
+    g_free (origin);
+    g_object_unref (info);
+
+    if (subject) {
+        ZeitgeistEvent *event = zeitgeist_event_new_full (
+            data->event_interpretation,
+            ZEITGEIST_ZG_USER_ACTIVITY,
+            ZEITGEIST_NAUTILUS_ACTOR,
+            subject, NULL);
+        send_event_to_zeitgeist (event);
+    }
+
+    g_object_unref (data->file);
+    g_free (data->original_uri);
+    g_free (data);
+}
+
+static void
+log_zeitgeist_event_for_file_no_reply (const char *event_interpretation,
+    GFile *file, gchar *original_uri)
+{
+    _ZeitgeistFileEventData *data;
+    data = g_new0 (_ZeitgeistFileEventData, 1);
+
+    data->event_interpretation = event_interpretation;
+    data->original_uri = original_uri;
+    data->file = file;
+
+    g_file_query_info_async (file,
+        G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME ","
+            G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
+        G_FILE_QUERY_INFO_NONE,
+        G_PRIORITY_DEFAULT,
+        NULL,
+        _log_zeitgeist_event_for_file_cb, data);
+}
+
 static void
 mark_desktop_file_trusted (CommonJob *common,
 			   GCancellable *cancellable,
@@ -1835,6 +1935,35 @@
 
 	job = user_data;
 
+	// Send event to Zeitgeist for deletions/trash
+    GList *file_iter = job->files;
+	while (file_iter != NULL) {
+		gchar *uri = g_file_get_uri (file_iter->data);
+		gchar *origin = g_path_get_dirname (uri);
+        gchar *parse_name = g_file_get_parse_name (file_iter->data);
+		gchar *display_name = g_path_get_basename (parse_name);
+		ZeitgeistEvent *event = zeitgeist_event_new_full (
+			ZEITGEIST_ZG_DELETE_EVENT,
+			ZEITGEIST_ZG_USER_ACTIVITY,
+			ZEITGEIST_NAUTILUS_ACTOR,
+			zeitgeist_subject_new_full (
+				uri,
+				NULL, // subject interpretation - auto-guess
+				NULL, // suject manifestation - auto-guess
+				NULL, // mime-type
+				origin,
+				display_name,
+				NULL // storage - auto-guess
+			), NULL);
+		send_event_to_zeitgeist (event);
+		g_free (uri);
+		g_free (origin);
+        g_free (parse_name);
+		g_free (display_name);
+        file_iter = g_list_next (file_iter);
+	}
+	// ---
+
 	g_list_free_full (job->files, g_object_unref);
 
 	if (job->done_callback) {
@@ -4433,6 +4562,23 @@
 		job->done_callback (job->debuting_files, job->done_callback_data);
 	}
 
+	// Send event to Zeitgeist
+	GHashTableIter iter;
+	GFile *file;
+	gpointer done;
+	g_hash_table_iter_init (&iter, job->debuting_files);
+	while (g_hash_table_iter_next (&iter, (gpointer *) &file, &done)) {
+		if (GPOINTER_TO_INT (done)) {
+            // operation was completed successfully for this file
+            g_object_ref (file);
+            // FIXME: Set event origin to the original file URI, if we
+            //        can somehow figure out which one it is.
+            log_zeitgeist_event_for_file_no_reply (
+                ZEITGEIST_ZG_CREATE_EVENT, file, NULL);
+		}
+	}
+	// ---
+
 	g_list_free_full (job->files, g_object_unref);
 	if (job->destination) {
 		g_object_unref (job->destination);
@@ -4978,6 +5124,19 @@
 		job->done_callback (job->debuting_files, job->done_callback_data);
 	}
 
+	// Send event to Zeitgeist for moved files (not renaming)
+    GList *file_iter = job->files;
+	while (file_iter != NULL) {
+        char *basename = g_file_get_basename (file_iter->data);
+        GFile *new_file = g_file_get_child (job->destination, basename);
+        g_free (basename);
+
+        log_zeitgeist_event_for_file_no_reply (ZEITGEIST_ZG_MOVE_EVENT,
+            new_file, g_file_get_uri (file_iter->data));
+        file_iter = g_list_next (file_iter);
+	}
+	// ---
+
 	g_list_free_full (job->files, g_object_unref);
 	g_object_unref (job->destination);
 	g_hash_table_unref (job->debuting_files);
@@ -5295,6 +5454,23 @@
 		job->done_callback (job->debuting_files, job->done_callback_data);
 	}
 
+	// Send event to Zeitgeist
+	GHashTableIter iter;
+	GFile *file;
+	gpointer done;
+	g_hash_table_iter_init (&iter, job->debuting_files);
+	while (g_hash_table_iter_next (&iter, (gpointer *) &file, &done)) {
+		if (GPOINTER_TO_INT (done)) {
+            // operation was completed successfully for this file
+            g_object_ref (file);
+            // FIXME: Set event origin to the original file URI, if we
+            //        can somehow figure out which one it is.
+            log_zeitgeist_event_for_file_no_reply (
+                ZEITGEIST_ZG_CREATE_EVENT, file, NULL);
+		}
+	}
+	// ---
+
 	g_list_free_full (job->files, g_object_unref);
 	g_object_unref (job->destination);
 	g_hash_table_unref (job->debuting_files);
@@ -5726,6 +5902,14 @@
 		job->done_callback (job->created_file, job->done_callback_data);
 	}
 
+	// Send event to Zeitgeist
+    if (job->created_file) {
+        g_object_ref (job->created_file);
+        log_zeitgeist_event_for_file_no_reply (
+            ZEITGEIST_ZG_CREATE_EVENT, job->created_file, NULL);
+    }
+    // ---
+
 	g_object_unref (job->dest_dir);
 	if (job->src) {
 		g_object_unref (job->src);

=== modified file 'libnautilus-private/nautilus-file.c'
--- libnautilus-private/nautilus-file.c	2012-02-02 12:48:30 +0000
+++ libnautilus-private/nautilus-file.c	2012-02-06 11:41:04 +0000
@@ -88,6 +88,9 @@
 #define DEBUG_REF_PRINTF printf
 #endif
 
+#include <zeitgeist.h>
+#define ZEITGEIST_NAUTILUS_ACTOR "application://nautilus.desktop"
+
 /* Files that start with these characters sort after files that don't. */
 #define SORT_LAST_CHAR1 '.'
 #define SORT_LAST_CHAR2 '#'
@@ -1721,10 +1724,34 @@
 		old_name = g_strdup (eel_ref_str_peek (op->file->details->name));
 		
 		update_info_and_name (op->file, new_info);
-		
+
 		g_free (old_name);
 		
 		new_uri = nautilus_file_get_uri (op->file);
+
+		// Send event to Zeitgeist
+		ZeitgeistLog *log = zeitgeist_log_get_default ();
+		gchar *origin = g_path_get_dirname (new_uri);
+		ZeitgeistSubject *subject = zeitgeist_subject_new_full (
+			old_uri,
+			NULL, // subject interpretation - auto-guess
+			NULL, // subject manifestation - auto-guess
+			g_file_info_get_content_type (new_info), // const char*
+			origin,
+			new_name,
+			NULL // storage - auto-guess
+		);
+        zeitgeist_subject_set_current_uri (subject, new_uri);
+		g_free (origin);
+		// FIXME: zeitgeist_subject_set_current_uri ();
+		ZeitgeistEvent *event = zeitgeist_event_new_full (
+			ZEITGEIST_ZG_MOVE_EVENT,
+			ZEITGEIST_ZG_USER_ACTIVITY,
+			ZEITGEIST_NAUTILUS_ACTOR,
+			subject, NULL);
+		zeitgeist_log_insert_events_no_reply (log, event, NULL);
+		// ---
+		
 		nautilus_directory_moved (old_uri, new_uri);
 		g_free (new_uri);
 		g_free (old_uri);

=== added file 'test/run-zeitgeist-test.sh'
--- test/run-zeitgeist-test.sh	1970-01-01 00:00:00 +0000
+++ test/run-zeitgeist-test.sh	2012-02-27 18:55:32 +0000
@@ -0,0 +1,50 @@
+#! /bin/sh -e
+
+#echo "Building..."
+#gcc test-nautilus-zeitgeist.c -o test-nautilus-zeitgeist \
+#    ../libnautilus-private/nautilus-file-operations.c \
+#    `pkg-config --cflags --libs glib-2.0 gtk+-3.0 zeitgeist-1.0` -I.. \
+[ "`basename $(pwd)`" = "test" ] || echo "Please cd into test/"
+[ "`basename $(pwd)`" = "test" ] || exit
+make
+
+echo "Configuring environment..."
+
+TMP_PATH="/tmp/nautilus-zg-test"
+
+rm -rf "${TMP_PATH}"
+mkdir -p "${TMP_PATH}/cache"
+
+# Launching Zeitgeist
+export ZEITGEIST_DATA_PATH="${TMP_PATH}"
+export ZEITGEIST_DATABASE_PATH=":memory:"
+export ZEITGEIST_DISABLED_EXTENSIONS="SearchEngine"
+export XDG_CACHE_HOME="${TMP_PATH}/cache"
+zeitgeist-daemon --replace --no-datahub >/dev/null 2>&1 &
+
+echo "Creating files to be used by the tests..."
+
+# test_copy_move
+mkdir "${TMP_PATH}/move_dest"
+touch "${TMP_PATH}/moveme.txt"
+
+# test_copy and test_new_file_from_template
+echo "#! /usr/bin/env python\nprint 'hi!'" > "${TMP_PATH}/a.py"
+
+# test_delete
+touch "${TMP_PATH}/del1.txt" "${TMP_PATH}/del2.txt"
+
+echo "Testing..."
+export G_MESSAGES_DEBUG=all
+#dbus-test-runner \
+#  --task zeitgeist-daemon \
+#    --parameter --no-datahub \
+#    --parameter --log-level=DEBUG \
+#  --task gtester \
+#    --parameter --verbose \
+#    --parameter ./test-nautilus-zeitgeist
+./test-nautilus-zeitgeist
+
+echo "Cleaning up..."
+zeitgeist-daemon --quit
+rm -r "${TMP_PATH}"

=== added file 'test/test-nautilus-zeitgeist.c'
--- test/test-nautilus-zeitgeist.c	1970-01-01 00:00:00 +0000
+++ test/test-nautilus-zeitgeist.c	2012-03-08 16:47:26 +0000
@@ -0,0 +1,343 @@
+/*
+ * Copyright © 2012 Canonical Ltd.
+ *             By Siegfried-A. Gevatter <siegfried.gevatter@collabora.co.uk>
+ *
+ * License: GPLv2+
+ *
+ *  The tests in this file require that certain directories and files exist
+ *  in order to operate on them. Please use ./run-zeitgeist-test.sh to launch
+ *  this test, since it'll create them for you (in a temporary directory).
+ *
+ * */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <zeitgeist.h>
+#include <string.h>
+
+#include <libnautilus-private/nautilus-file-operations.h>
+
+// After doing a file operation and before checking Zeitgeist for
+// events, we needed to give Nautilus some time to insert the events
+// (because of g_file_query_info, etc).
+#define SLEEP_TIME  400
+
+// Test location
+#define TEST_PATH   "/tmp/nautilus-zg-test"
+#define TEST_URI    "file://" TEST_PATH
+
+typedef struct
+{
+    ZeitgeistLog        *log;
+    GMainLoop           *mainloop;
+    ZeitgeistTimeRange  *query_time_range;
+    GPtrArray           *expected_events;
+    guint               num_expected_events;
+} Fixture;
+
+static void
+setup_test (Fixture *fix, gconstpointer data)
+{
+    fix->log = zeitgeist_log_new ();
+    fix->mainloop = g_main_loop_new (NULL, FALSE);
+    fix->query_time_range = zeitgeist_time_range_new_from_now ();
+    fix->expected_events = g_ptr_array_new_with_free_func (
+        (GDestroyNotify) g_object_unref);
+    fix->num_expected_events = 0;
+}
+
+static void teardown (Fixture *fix, gconstpointer data)
+{
+    g_object_unref (fix->log);
+    g_object_unref (fix->query_time_range);
+    g_ptr_array_free (fix->expected_events, TRUE);
+    g_main_loop_unref (fix->mainloop);
+
+    fix->log = NULL;
+    fix->mainloop = NULL;
+    fix->query_time_range = NULL;
+    fix->expected_events = NULL;
+}
+
+static void
+test_add_event_assertion (Fixture *fix,
+    const char *event_interpretation, const char *uri, const char *current_uri,
+    const char *origin, const char *text, const char *mimetype)
+{
+    // Create subject template
+    ZeitgeistSubject *subject_template = zeitgeist_subject_new_full (
+        uri, NULL, NULL, mimetype, origin, text, NULL);
+    zeitgeist_subject_set_current_uri (subject_template, current_uri);
+
+    // Create event template
+    ZeitgeistEvent *event_template = zeitgeist_event_new_full (
+        event_interpretation, ZEITGEIST_ZG_USER_ACTIVITY, NULL,
+        subject_template, NULL);
+
+    // Add event template to the fixture for later verification
+    g_ptr_array_add (fix->expected_events, (gpointer) event_template);
+    fix->num_expected_events++;
+}
+
+static void
+assert_event_matches_template (ZeitgeistEvent *event, ZeitgeistEvent *tmpl)
+{
+    int i;
+    int num_subjects = zeitgeist_event_num_subjects (tmpl);
+
+    g_assert_cmpstr (zeitgeist_event_get_interpretation (event), ==,
+        zeitgeist_event_get_interpretation (tmpl));
+    g_assert_cmpstr (zeitgeist_event_get_manifestation (event), ==,
+        zeitgeist_event_get_manifestation (tmpl));
+    g_assert_cmpint (zeitgeist_event_num_subjects (event), ==, num_subjects);
+
+    for (i = 0; i < num_subjects; ++i)
+    {
+        ZeitgeistSubject *subject = zeitgeist_event_get_subject (event, i);
+        ZeitgeistSubject *subj_templ = zeitgeist_event_get_subject (tmpl, i);
+
+        g_assert_cmpstr (zeitgeist_subject_get_uri (subject), ==,
+            zeitgeist_subject_get_uri (subj_templ));
+        g_assert_cmpstr (zeitgeist_subject_get_current_uri (subject), ==,
+            zeitgeist_subject_get_current_uri (subj_templ));
+        g_assert_cmpstr (zeitgeist_subject_get_origin (subject), ==,
+            zeitgeist_subject_get_origin (subj_templ));
+        g_assert_cmpstr (zeitgeist_subject_get_text (subject), ==,
+            zeitgeist_subject_get_text (subj_templ));
+        g_assert_cmpstr (zeitgeist_subject_get_mimetype (subject), ==,
+            zeitgeist_subject_get_mimetype (subj_templ));
+    }
+}
+
+static void
+assert_results_as_expected (Fixture *fix, ZeitgeistResultSet *results)
+{
+    int i;
+
+    g_assert_cmpint (zeitgeist_result_set_size (results), ==,
+        fix->num_expected_events);
+
+    for (i = 0; i < fix->num_expected_events; ++i)
+    {
+        ZeitgeistEvent *event = zeitgeist_result_set_next (results);
+        ZeitgeistEvent *tmpl = g_ptr_array_index (fix->expected_events, i);
+        assert_event_matches_template (event, tmpl);
+    }
+}
+
+static void
+_zeitgeist_test_cb2 (ZeitgeistLog *log, GAsyncResult *res, Fixture *fix)
+{
+    GError *error = NULL;
+    ZeitgeistResultSet *results = zeitgeist_log_find_events_finish (
+            log, res, &error);
+    if (error)
+    {
+        g_warning ("Error with FindEventIds: %s", error->message);
+        g_error_free (error);
+        g_assert_not_reached ();
+    }
+
+    assert_results_as_expected (fix, results);
+    g_object_unref (results);
+
+    g_main_loop_quit (fix->mainloop);
+}
+
+static gboolean
+_zeitgeist_test_cb1 (Fixture *fix)
+{
+    zeitgeist_log_find_events (fix->log,
+                               fix->query_time_range,
+                               g_ptr_array_new (),
+                               ZEITGEIST_STORAGE_STATE_ANY,
+                               50,
+                               ZEITGEIST_RESULT_TYPE_MOST_RECENT_EVENTS,
+                               NULL,
+                               (GAsyncReadyCallback) _zeitgeist_test_cb2,
+                               fix);
+
+    return FALSE;
+}
+
+static void
+zeitgeist_test_start (GHashTable *debuting_uris, Fixture *fix)
+{
+    g_timeout_add (SLEEP_TIME, (GSourceFunc) _zeitgeist_test_cb1, (gpointer) fix);
+}
+
+static void
+zeitgeist_test_start_3 (GHashTable *debuting_uris, gboolean user_cancel,
+        gpointer callback_data)
+{
+    zeitgeist_test_start (debuting_uris, callback_data);
+}
+
+static void
+test_copy_move (Fixture *fix, gconstpointer data)
+{
+    test_add_event_assertion (fix, ZEITGEIST_ZG_MOVE_EVENT,
+                                    TEST_URI "/moveme.txt",
+                                    TEST_URI "/move_dest/moveme.txt",
+                                    TEST_URI "/move_dest",
+                                    "moveme.txt",
+                                    "text/plain");
+
+    GList *item_uris = NULL;
+    item_uris = g_list_prepend (item_uris,
+                                TEST_URI "/moveme.txt");
+
+    nautilus_file_operations_copy_move (
+            item_uris,
+            NULL,
+            TEST_URI "/move_dest",
+            GDK_ACTION_MOVE,
+            NULL,
+            (NautilusCopyCallback) zeitgeist_test_start,
+            fix);
+
+    g_main_loop_run (fix->mainloop);
+}
+
+static void
+test_copy (Fixture *fix, gconstpointer data)
+{
+    test_add_event_assertion (fix, ZEITGEIST_ZG_CREATE_EVENT,
+                                    TEST_URI "/b.py",
+                                    TEST_URI "/b.py",
+                                    TEST_URI,
+                                    "b.py",
+                                    "text/x-python");
+
+    nautilus_file_operations_copy_file (
+            g_file_new_for_path (TEST_PATH "/a.py"),
+            g_file_new_for_path (TEST_PATH),
+            "a.py", "b.py",
+            NULL,
+            (NautilusCopyCallback) zeitgeist_test_start,
+            fix);
+
+    g_main_loop_run (fix->mainloop);
+}
+
+static void
+test_new_folder (Fixture *fix, gconstpointer data)
+{
+    test_add_event_assertion (fix, ZEITGEIST_ZG_CREATE_EVENT,
+                                   TEST_URI "/Untitled%20Folder",
+                                   TEST_URI "/Untitled%20Folder",
+                                   TEST_URI,
+                                   "Untitled Folder",
+                                   "inode/directory");
+
+    nautilus_file_operations_new_folder (
+            NULL, NULL,
+            TEST_URI,
+            (NautilusCopyCallback) zeitgeist_test_start,
+            fix);
+
+    g_main_loop_run (fix->mainloop);
+}
+
+static void
+test_new_file (Fixture *fix, gconstpointer data)
+{
+    test_add_event_assertion (fix, ZEITGEIST_ZG_CREATE_EVENT,
+                                   TEST_URI "/new_file_test.txt",
+                                   TEST_URI "/new_file_test.txt",
+                                   TEST_URI,
+                                   "new_file_test.txt",
+                                   "text/plain");
+
+    const char content[] = "this is the content of a text file...\n";
+    nautilus_file_operations_new_file (
+            NULL, NULL,
+            TEST_URI,
+            "new_file_test.txt",
+            content, strlen (content),
+            (NautilusCopyCallback) zeitgeist_test_start,
+            fix);
+
+    g_main_loop_run (fix->mainloop);
+}
+
+static void
+test_new_file_from_template (Fixture *fix, gconstpointer data)
+{
+    test_add_event_assertion (fix, ZEITGEIST_ZG_CREATE_EVENT,
+                                   TEST_URI "/new_tpl_file_test.py",
+                                   TEST_URI "/new_tpl_file_test.py",
+                                   TEST_URI,
+                                   "new_tpl_file_test.py",
+                                   "text/x-python");
+
+    nautilus_file_operations_new_file_from_template (
+            NULL, NULL,
+            TEST_URI,
+            "new_tpl_file_test.py",
+            TEST_URI "/a.py",
+            (NautilusCopyCallback) zeitgeist_test_start,
+            fix);
+
+    g_main_loop_run (fix->mainloop);
+}
+
+static void
+test_delete (Fixture *fix, gconstpointer data)
+{
+    test_add_event_assertion (fix, ZEITGEIST_ZG_DELETE_EVENT,
+                                   TEST_URI "/del1.txt",
+                                   TEST_URI "/del1.txt",
+                                   TEST_URI,
+                                   "del1.txt",
+                                   NULL);
+    test_add_event_assertion (fix, ZEITGEIST_ZG_DELETE_EVENT,
+                                   TEST_URI "/del2.txt",
+                                   TEST_URI "/del2.txt",
+                                   TEST_URI,
+                                   "del2.txt",
+                                   NULL);
+
+    GList *file_list = NULL;
+    file_list = g_list_prepend (file_list,
+                                g_file_new_for_path (TEST_PATH "/del1.txt"));
+    file_list = g_list_prepend (file_list,
+                                g_file_new_for_path (TEST_PATH "/del2.txt"));
+
+    // Nautilus_file_operations_trash_or_delete is exactly the same
+    // NOTE: This operation will ask for manual confirmation of the delete.
+    //       There isn't really any nice way around this :(.
+    nautilus_file_operations_delete (
+            file_list,
+            NULL,
+            (NautilusDeleteCallback) zeitgeist_test_start_3,
+            fix);
+
+    g_main_loop_run (fix->mainloop);
+}
+
+int 
+main (int argc, char* argv[])
+{
+    g_type_init ();
+
+    g_test_init (&argc, &argv, NULL);
+    gtk_init (&argc, &argv);
+
+    g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL);
+
+    g_test_add ("/Zeitgeist/CopyMove", Fixture, 0,
+        setup_test, test_copy_move, teardown);
+    g_test_add ("/Zeitgeist/Copy", Fixture, 0,
+        setup_test, test_copy, teardown);
+    g_test_add ("/Zeitgeist/NewFolder", Fixture, 0,
+        setup_test, test_new_folder, teardown);
+    g_test_add ("/Zeitgeist/NewFile", Fixture, 0,
+        setup_test, test_new_file, teardown);
+    g_test_add ("/Zeitgeist/NewFileFromTemplate", Fixture, 0,
+        setup_test, test_new_file_from_template, teardown);
+    g_test_add ("/Zeitgeist/Delete", Fixture, 0,
+        setup_test, test_delete, teardown);
+
+    return g_test_run ();
+}

