[gnome-keyring/wip/gdbus: 22/23] Annotate generated types from gdbus-codegen



commit 0f845b21bed8f5c8fceae356b78d2c3cd019cb0c
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Sat Apr 25 13:38:38 2015 -0700

    Annotate generated types from gdbus-codegen
    
    Give these generated classes some sensible names.

 daemon/dbus/Makefile.am          |    7 +++
 daemon/dbus/gkd-dbus.c           |   18 ++++----
 daemon/dbus/gkd-secret-objects.c |   84 +++++++++++++++++++-------------------
 daemon/dbus/gkd-secret-prompt.c  |   16 ++++----
 daemon/dbus/gkd-secret-service.c |   82 ++++++++++++++++++------------------
 daemon/dbus/gkd-secret-session.c |    8 ++--
 daemon/dbus/gkd-secret-unlock.c  |   18 ++++----
 7 files changed, 120 insertions(+), 113 deletions(-)
---
diff --git a/daemon/dbus/Makefile.am b/daemon/dbus/Makefile.am
index a2f0b37..1b67644 100644
--- a/daemon/dbus/Makefile.am
+++ b/daemon/dbus/Makefile.am
@@ -5,6 +5,11 @@ daemon/dbus/gkd-secrets-generated.h: daemon/dbus/org.freedesktop.Secrets.xml Mak
        $(AM_V_GEN) gdbus-codegen --interface-prefix org.freedesktop.Secrets. \
        --generate-c-code daemon/dbus/gkd-secrets-generated \
        --c-namespace Gkd \
+       --annotate "org.freedesktop.Secret.Service" "org.gtk.GDBus.C.Name" ExportedService \
+       --annotate "org.freedesktop.Secret.Collection" "org.gtk.GDBus.C.Name" ExportedCollection \
+       --annotate "org.freedesktop.Secret.Item" "org.gtk.GDBus.C.Name" ExportedItem \
+       --annotate "org.freedesktop.Secret.Session" "org.gtk.GDBus.C.Name" ExportedSession \
+       --annotate "org.freedesktop.Secret.Prompt" "org.gtk.GDBus.C.Name" ExportedPrompt \
        $(srcdir)/daemon/dbus/org.freedesktop.Secrets.xml
 daemon/dbus/gkd-secrets-generated.c: daemon/dbus/gkd-secrets-generated.h
        @: # generated as a side-effect
@@ -13,6 +18,7 @@ daemon/dbus/gkd-daemon-generated.h: daemon/dbus/org.gnome.keyring.Daemon.xml Mak
        $(AM_V_GEN) gdbus-codegen --interface-prefix org.gnome.keyring.Daemon. \
        --generate-c-code daemon/dbus/gkd-daemon-generated \
        --c-namespace Gkd \
+       --annotate "org.gnome.keyring.Daemon" "org.gtk.GDBus.C.Name" ExportedDaemon \
        $(srcdir)/daemon/dbus/org.gnome.keyring.Daemon.xml
 daemon/dbus/gkd-daemon-generated.c: daemon/dbus/gkd-daemon-generated.h
        @: # generated as a side-effect
@@ -21,6 +27,7 @@ daemon/dbus/gkd-internal-generated.h: daemon/dbus/org.gnome.keyring.InternalUnsu
        $(AM_V_GEN) gdbus-codegen --interface-prefix 
org.gnome.keyring.InternalUnsupportedGuiltRiddenInterface. \
        --generate-c-code daemon/dbus/gkd-internal-generated \
        --c-namespace Gkd \
+       --annotate "org.gnome.keyring.InternalUnsupportedGuiltRiddenInterface" "org.gtk.GDBus.C.Name" 
ExportedInternal \
        $(srcdir)/daemon/dbus/org.gnome.keyring.InternalUnsupportedGuiltRiddenInterface.xml
 daemon/dbus/gkd-internal-generated.c: daemon/dbus/gkd-internal-generated.h
        @: # generated as a side-effect
diff --git a/daemon/dbus/gkd-dbus.c b/daemon/dbus/gkd-dbus.c
index 743995f..d927a8a 100644
--- a/daemon/dbus/gkd-dbus.c
+++ b/daemon/dbus/gkd-dbus.c
@@ -81,7 +81,7 @@ connect_to_session_bus (void)
 }
 
 static gboolean
-handle_get_environment (GkdOrgGnomeKeyringDaemon *skeleton,
+handle_get_environment (GkdExportedDaemon *skeleton,
                        GDBusMethodInvocation *invocation,
                        gpointer user_data)
 {
@@ -98,25 +98,25 @@ handle_get_environment (GkdOrgGnomeKeyringDaemon *skeleton,
                g_strfreev (parts);
        }
 
-       gkd_org_gnome_keyring_daemon_complete_get_environment (skeleton, invocation,
-                                                              g_variant_builder_end (&builder));
+       gkd_exported_daemon_complete_get_environment (skeleton, invocation,
+                                                     g_variant_builder_end (&builder));
        return TRUE;
 }
 
 static gboolean
-handle_get_control_directory (GkdOrgGnomeKeyringDaemon *skeleton,
+handle_get_control_directory (GkdExportedDaemon *skeleton,
                              GDBusMethodInvocation *invocation,
                              gpointer user_data)
 {
-       gkd_org_gnome_keyring_daemon_complete_get_control_directory (skeleton, invocation,
-                                                                    gkd_util_get_master_directory ());
+       gkd_exported_daemon_complete_get_control_directory (skeleton, invocation,
+                                                           gkd_util_get_master_directory ());
        return TRUE;
 }
 
 static void
 cleanup_singleton (gpointer user_data)
 {
-       GkdOrgGnomeKeyringDaemon *skeleton = user_data;
+       GkdExportedDaemon *skeleton = user_data;
 
        g_return_if_fail (dbus_conn);
        if (object_registered) {
@@ -134,7 +134,7 @@ gkd_dbus_singleton_acquire (gboolean *acquired)
        GVariant *acquire_variant;
        guint res;
        GError *error = NULL;
-       GkdOrgGnomeKeyringDaemon *skeleton;
+       GkdExportedDaemon *skeleton;
 
        g_assert (acquired);
 
@@ -143,7 +143,7 @@ gkd_dbus_singleton_acquire (gboolean *acquired)
 
        /* First register the object */
        if (!object_registered) {
-               skeleton = gkd_org_gnome_keyring_daemon_skeleton_new ();
+               skeleton = gkd_exported_daemon_skeleton_new ();
 
                g_signal_connect (skeleton, "handle-get-control-directory",
                                  G_CALLBACK (handle_get_control_directory), NULL);
diff --git a/daemon/dbus/gkd-secret-objects.c b/daemon/dbus/gkd-secret-objects.c
index 8c33b97..190ae86 100644
--- a/daemon/dbus/gkd-secret-objects.c
+++ b/daemon/dbus/gkd-secret-objects.c
@@ -50,18 +50,18 @@ struct _GkdSecretObjects {
  */
 
 typedef struct {
-       GkdOrgFreedesktopSecretCollectionSkeleton parent;
+       GkdExportedCollectionSkeleton parent;
        GkdSecretObjects *objects;
 } GkdSecretCollectionSkeleton;
 typedef struct {
-       GkdOrgFreedesktopSecretCollectionSkeletonClass parent_class;
+       GkdExportedCollectionSkeletonClass parent_class;
 } GkdSecretCollectionSkeletonClass;
 typedef struct {
-       GkdOrgFreedesktopSecretItemSkeleton parent;
+       GkdExportedItemSkeleton parent;
        GkdSecretObjects *objects;
 } GkdSecretItemSkeleton;
 typedef struct {
-       GkdOrgFreedesktopSecretItemSkeletonClass parent_class;
+       GkdExportedItemSkeletonClass parent_class;
 } GkdSecretItemSkeletonClass;
 
 static GckObject * secret_objects_lookup_gck_object_for_path (GkdSecretObjects *self,
@@ -70,9 +70,9 @@ static GckObject * secret_objects_lookup_gck_object_for_path (GkdSecretObjects *
                                                              GError **error);
 
 GType gkd_secret_collection_skeleton_get_type (void);
-G_DEFINE_TYPE (GkdSecretCollectionSkeleton, gkd_secret_collection_skeleton, 
GKD_TYPE_ORG_FREEDESKTOP_SECRET_COLLECTION_SKELETON)
+G_DEFINE_TYPE (GkdSecretCollectionSkeleton, gkd_secret_collection_skeleton, 
GKD_TYPE_EXPORTED_COLLECTION_SKELETON)
 GType gkd_secret_item_skeleton_get_type (void);
-G_DEFINE_TYPE (GkdSecretItemSkeleton, gkd_secret_item_skeleton, 
GKD_TYPE_ORG_FREEDESKTOP_SECRET_ITEM_SKELETON)
+G_DEFINE_TYPE (GkdSecretItemSkeleton, gkd_secret_item_skeleton, GKD_TYPE_EXPORTED_ITEM_SKELETON)
 
 static void
 on_object_path_append_to_builder (GkdSecretObjects *self,
@@ -225,8 +225,8 @@ gkd_secret_collection_skeleton_set_property_dbus (GDBusConnection *connection,
        }
 
        if (g_strcmp0 (property_name, "Label") == 0) {
-               gkd_org_freedesktop_secret_collection_set_label (GKD_ORG_FREEDESKTOP_SECRET_COLLECTION (self),
-                                                                g_variant_get_string (value, NULL));
+               gkd_exported_collection_set_label (GKD_EXPORTED_COLLECTION (self),
+                                                  g_variant_get_string (value, NULL));
        }
 
        gkd_secret_service_emit_collection_changed (self->objects->service, object_path);
@@ -289,10 +289,10 @@ gkd_secret_collection_skeleton_init (GkdSecretCollectionSkeleton *self)
 {
 }
 
-static GkdOrgFreedesktopSecretCollection *
+static GkdExportedCollection *
 gkd_secret_collection_skeleton_new (GkdSecretObjects *objects)
 {
-       GkdOrgFreedesktopSecretCollection *self = g_object_new (gkd_secret_collection_skeleton_get_type (), 
NULL);
+       GkdExportedCollection *self = g_object_new (gkd_secret_collection_skeleton_get_type (), NULL);
        ((GkdSecretCollectionSkeleton *) self)->objects = objects;
        return self;
 }
@@ -320,11 +320,11 @@ gkd_secret_item_skeleton_set_property_dbus (GDBusConnection *connection,
        }
 
        if (g_strcmp0 (property_name, "Attributes") == 0) {
-               gkd_org_freedesktop_secret_item_set_attributes (GKD_ORG_FREEDESKTOP_SECRET_ITEM (self),
-                                                               g_variant_get_variant (value));
+               gkd_exported_item_set_attributes (GKD_EXPORTED_ITEM (self),
+                                                 g_variant_get_variant (value));
        } else if (g_strcmp0 (property_name, "Label") == 0) {
-               gkd_org_freedesktop_secret_item_set_label (GKD_ORG_FREEDESKTOP_SECRET_ITEM (self),
-                                                          g_variant_get_string (value, NULL));
+               gkd_exported_item_set_label (GKD_EXPORTED_ITEM (self),
+                                            g_variant_get_string (value, NULL));
        }
 
        gkd_secret_objects_emit_item_changed (self->objects, object);
@@ -383,10 +383,10 @@ gkd_secret_item_skeleton_init (GkdSecretItemSkeleton *self)
 {
 }
 
-static GkdOrgFreedesktopSecretItem *
+static GkdExportedItem *
 gkd_secret_item_skeleton_new (GkdSecretObjects *objects)
 {
-       GkdOrgFreedesktopSecretItem *self = g_object_new (gkd_secret_item_skeleton_get_type (), NULL);
+       GkdExportedItem *self = g_object_new (gkd_secret_item_skeleton_get_type (), NULL);
        ((GkdSecretItemSkeleton *) self)->objects = objects;
        return self;
 }
@@ -517,7 +517,7 @@ secret_objects_lookup_gck_object_for_invocation (GkdSecretObjects *self,
 }
 
 static gboolean
-item_method_delete (GkdOrgFreedesktopSecretItem *skeleton,
+item_method_delete (GkdExportedItem *skeleton,
                    GDBusMethodInvocation *invocation,
                    GkdSecretObjects *self)
 {
@@ -543,7 +543,7 @@ item_method_delete (GkdOrgFreedesktopSecretItem *skeleton,
                }
 
                /* No prompt necessary */
-               gkd_org_freedesktop_secret_item_complete_delete (skeleton, invocation, "/");
+               gkd_exported_item_complete_delete (skeleton, invocation, "/");
 
        } else {
                if (g_error_matches (error, GCK_ERROR, CKR_USER_NOT_LOGGED_IN))
@@ -567,7 +567,7 @@ item_method_delete (GkdOrgFreedesktopSecretItem *skeleton,
 }
 
 static gboolean
-item_method_get_secret (GkdOrgFreedesktopSecretItem *skeleton,
+item_method_get_secret (GkdExportedItem *skeleton,
                        GDBusMethodInvocation *invocation,
                        gchar *path,
                        GkdSecretObjects *self)
@@ -597,8 +597,8 @@ item_method_get_secret (GkdOrgFreedesktopSecretItem *skeleton,
                goto cleanup;
        }
 
-       gkd_org_freedesktop_secret_item_complete_get_secret (skeleton, invocation,
-                                                            gkd_secret_secret_append (secret));
+       gkd_exported_item_complete_get_secret (skeleton, invocation,
+                                              gkd_secret_secret_append (secret));
        gkd_secret_secret_free (secret);
 
  cleanup:
@@ -607,7 +607,7 @@ item_method_get_secret (GkdOrgFreedesktopSecretItem *skeleton,
 }
 
 static gboolean
-item_method_set_secret (GkdOrgFreedesktopSecretItem *skeleton,
+item_method_set_secret (GkdExportedItem *skeleton,
                        GDBusMethodInvocation *invocation,
                        GVariant *secret_variant,
                        GkdSecretObjects *self)
@@ -639,7 +639,7 @@ item_method_set_secret (GkdOrgFreedesktopSecretItem *skeleton,
        if (error != NULL) {
                g_dbus_method_invocation_take_error (invocation, error);
        } else {
-               gkd_org_freedesktop_secret_item_complete_set_secret (skeleton, invocation);
+               gkd_exported_item_complete_set_secret (skeleton, invocation);
        }
 
        g_object_unref (item);
@@ -682,7 +682,7 @@ item_cleanup_search_results (GckSession *session, GList *items,
 }
 
 static gboolean
-collection_method_search_items (GkdOrgFreedesktopSecretCollection *skeleton,
+collection_method_search_items (GkdExportedCollection *skeleton,
                                GDBusMethodInvocation *invocation,
                                GVariant *attributes,
                                GkdSecretObjects *self)
@@ -803,7 +803,7 @@ object_path_for_collection (GckObject *collection)
 }
 
 static gboolean
-collection_method_create_item (GkdOrgFreedesktopSecretCollection *skeleton,
+collection_method_create_item (GkdExportedCollection *skeleton,
                               GDBusMethodInvocation *invocation,
                               GVariant *properties,
                               GVariant *secret_variant,
@@ -886,7 +886,7 @@ collection_method_create_item (GkdOrgFreedesktopSecretCollection *skeleton,
        path = object_path_for_item (base, item);
        gkd_secret_objects_emit_item_created (self, object, path);
 
-       gkd_org_freedesktop_secret_collection_complete_create_item (skeleton, invocation, path, "/");
+       gkd_exported_collection_complete_create_item (skeleton, invocation, path, "/");
 
 cleanup:
        if (error) {
@@ -915,7 +915,7 @@ cleanup:
 }
 
 static gboolean
-collection_method_delete (GkdOrgFreedesktopSecretCollection *skeleton,
+collection_method_delete (GkdExportedCollection *skeleton,
                          GDBusMethodInvocation *invocation,
                          GkdSecretObjects *self)
 {
@@ -943,7 +943,7 @@ collection_method_delete (GkdOrgFreedesktopSecretCollection *skeleton,
 
        /* Notify the callers that a collection was deleted */
        gkd_secret_service_emit_collection_deleted (self->service, path);
-       gkd_org_freedesktop_secret_collection_complete_delete (skeleton, invocation, "/");
+       gkd_exported_collection_complete_delete (skeleton, invocation, "/");
 
  cleanup:
        g_free (path);
@@ -1465,7 +1465,7 @@ on_each_item_emit_locked (GkdSecretObjects *self,
                           GckObject *object,
                           gpointer user_data)
 {
-       GkdOrgFreedesktopSecretItem *skeleton;
+       GkdExportedItem *skeleton;
        GVariant *value;
        GError *error = NULL;
 
@@ -1483,7 +1483,7 @@ on_each_item_emit_locked (GkdSecretObjects *self,
                return;
        }
 
-       gkd_org_freedesktop_secret_item_set_locked (skeleton, g_variant_get_boolean (value));
+       gkd_exported_item_set_locked (skeleton, g_variant_get_boolean (value));
        g_variant_unref (value);
 
         gkd_secret_objects_emit_item_changed (self, object);
@@ -1494,7 +1494,7 @@ gkd_secret_objects_emit_collection_locked (GkdSecretObjects *self,
                                            GckObject *collection)
 {
        gchar *collection_path;
-       GkdOrgFreedesktopSecretCollection *skeleton;
+       GkdExportedCollection *skeleton;
        GVariant *value;
        GError *error = NULL;
 
@@ -1516,7 +1516,7 @@ gkd_secret_objects_emit_collection_locked (GkdSecretObjects *self,
                return;
        }
 
-       gkd_org_freedesktop_secret_collection_set_locked (skeleton, g_variant_get_boolean (value));
+       gkd_exported_collection_set_locked (skeleton, g_variant_get_boolean (value));
        g_variant_unref (value);
 
        gkd_secret_service_emit_collection_changed (self->service, collection_path);
@@ -1527,7 +1527,7 @@ static void
 gkd_secret_objects_register_item (GkdSecretObjects *self,
                                  const gchar *item_path)
 {
-       GkdOrgFreedesktopSecretItem *skeleton;
+       GkdExportedItem *skeleton;
        GError *error = NULL;
 
        skeleton = g_hash_table_lookup (self->items_to_skeletons, item_path);
@@ -1570,7 +1570,7 @@ gkd_secret_objects_emit_item_created (GkdSecretObjects *self,
                                       GckObject *collection,
                                       const gchar *item_path)
 {
-       GkdOrgFreedesktopSecretCollection *skeleton;
+       GkdExportedCollection *skeleton;
        gchar *collection_path;
        gchar **items;
 
@@ -1583,10 +1583,10 @@ gkd_secret_objects_emit_item_created (GkdSecretObjects *self,
        g_return_if_fail (skeleton != NULL);
 
        gkd_secret_objects_register_item (self, item_path);
-       gkd_org_freedesktop_secret_collection_emit_item_created (skeleton, item_path);
+       gkd_exported_collection_emit_item_created (skeleton, item_path);
 
        items = gkd_secret_objects_get_collection_items (self, collection_path);
-       gkd_org_freedesktop_secret_collection_set_items (skeleton, (const gchar **) items);
+       gkd_exported_collection_set_items (skeleton, (const gchar **) items);
 
        g_free (collection_path);
        g_strfreev (items);
@@ -1596,7 +1596,7 @@ void
 gkd_secret_objects_emit_item_changed (GkdSecretObjects *self,
                                       GckObject *item)
 {
-       GkdOrgFreedesktopSecretCollection *skeleton;
+       GkdExportedCollection *skeleton;
        gchar *collection_path;
        gchar *item_path;
 
@@ -1608,7 +1608,7 @@ gkd_secret_objects_emit_item_changed (GkdSecretObjects *self,
        g_return_if_fail (skeleton != NULL);
 
        item_path = object_path_for_item (collection_path, item);
-       gkd_org_freedesktop_secret_collection_emit_item_changed (skeleton, item_path);
+       gkd_exported_collection_emit_item_changed (skeleton, item_path);
 
        g_free (item_path);
        g_free (collection_path);
@@ -1619,7 +1619,7 @@ gkd_secret_objects_emit_item_deleted (GkdSecretObjects *self,
                                       GckObject *collection,
                                       const gchar *item_path)
 {
-       GkdOrgFreedesktopSecretCollection *skeleton;
+       GkdExportedCollection *skeleton;
        gchar *collection_path;
        gchar **items;
 
@@ -1632,10 +1632,10 @@ gkd_secret_objects_emit_item_deleted (GkdSecretObjects *self,
        g_return_if_fail (skeleton != NULL);
 
        gkd_secret_objects_unregister_item (self, item_path);
-       gkd_org_freedesktop_secret_collection_emit_item_deleted (skeleton, item_path);
+       gkd_exported_collection_emit_item_deleted (skeleton, item_path);
 
        items = gkd_secret_objects_get_collection_items (self, collection_path);
-       gkd_org_freedesktop_secret_collection_set_items (skeleton, (const gchar **) items);
+       gkd_exported_collection_set_items (skeleton, (const gchar **) items);
 
        g_strfreev (items);
        g_free (collection_path);
@@ -1659,7 +1659,7 @@ void
 gkd_secret_objects_register_collection (GkdSecretObjects *self,
                                        const gchar *collection_path)
 {
-       GkdOrgFreedesktopSecretCollection *skeleton;
+       GkdExportedCollection *skeleton;
        GError *error = NULL;
 
        skeleton = g_hash_table_lookup (self->collections_to_skeletons, collection_path);
diff --git a/daemon/dbus/gkd-secret-prompt.c b/daemon/dbus/gkd-secret-prompt.c
index 464a4e2..e8c8eda 100644
--- a/daemon/dbus/gkd-secret-prompt.c
+++ b/daemon/dbus/gkd-secret-prompt.c
@@ -48,7 +48,7 @@ struct _GkdSecretPromptPrivate {
        gchar *object_path;
        GkdSecretService *service;
        GkdSecretExchange *exchange;
-       GkdOrgFreedesktopSecretPrompt *skeleton;
+       GkdExportedPrompt *skeleton;
        GCancellable *cancellable;
        gboolean prompted;
        gboolean completed;
@@ -71,8 +71,8 @@ emit_completed (GkdSecretPrompt *self, gboolean dismissed)
        g_return_if_fail (GKD_SECRET_PROMPT_GET_CLASS (self)->encode_result);
        variant = GKD_SECRET_PROMPT_GET_CLASS (self)->encode_result (self);
 
-       gkd_org_freedesktop_secret_prompt_emit_completed (self->pv->skeleton,
-                                                         dismissed, variant);
+       gkd_exported_prompt_emit_completed (self->pv->skeleton,
+                                           dismissed, variant);
 }
 
 static void
@@ -98,7 +98,7 @@ on_system_prompt_inited (GObject *source,
 }
 
 static gboolean
-prompt_method_prompt (GkdOrgFreedesktopSecretPrompt *skeleton,
+prompt_method_prompt (GkdExportedPrompt *skeleton,
                      GDBusMethodInvocation *invocation,
                      gchar *window_id,
                      GkdSecretPrompt *self)
@@ -122,12 +122,12 @@ prompt_method_prompt (GkdOrgFreedesktopSecretPrompt *skeleton,
        g_async_initable_init_async (G_ASYNC_INITABLE (self), G_PRIORITY_DEFAULT,
                                     self->pv->cancellable, on_system_prompt_inited, NULL);
 
-       gkd_org_freedesktop_secret_prompt_complete_prompt (skeleton, invocation);
+       gkd_exported_prompt_complete_prompt (skeleton, invocation);
        return TRUE;
 }
 
 static gboolean
-prompt_method_dismiss (GkdOrgFreedesktopSecretPrompt *skeleton,
+prompt_method_dismiss (GkdExportedPrompt *skeleton,
                       GDBusMethodInvocation *invocation,
                       GkdSecretPrompt *self)
 {
@@ -137,7 +137,7 @@ prompt_method_dismiss (GkdOrgFreedesktopSecretPrompt *skeleton,
 
        gkd_secret_prompt_dismiss (self);
 
-       gkd_org_freedesktop_secret_prompt_complete_dismiss (skeleton, invocation);
+       gkd_exported_prompt_complete_dismiss (skeleton, invocation);
        return TRUE;
 }
 
@@ -174,7 +174,7 @@ gkd_secret_prompt_constructed (GObject *obj)
        /* Set the exchange for the prompt */
        g_object_set (self, "secret-exchange", self->pv->exchange, NULL);
 
-        self->pv->skeleton = gkd_org_freedesktop_secret_prompt_skeleton_new ();
+        self->pv->skeleton = gkd_exported_prompt_skeleton_new ();
         g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (self->pv->skeleton),
                                           gkd_secret_service_get_connection (self->pv->service), 
self->pv->object_path,
                                           &error);
diff --git a/daemon/dbus/gkd-secret-service.c b/daemon/dbus/gkd-secret-service.c
index 01db765..3b75f09 100644
--- a/daemon/dbus/gkd-secret-service.c
+++ b/daemon/dbus/gkd-secret-service.c
@@ -51,15 +51,15 @@
  * SKELETON
  */
 typedef struct {
-       GkdOrgFreedesktopSecretServiceSkeleton parent;
+       GkdExportedServiceSkeleton parent;
        GkdSecretService *service;
 } GkdSecretServiceSkeleton;
 typedef struct {
-       GkdOrgFreedesktopSecretServiceSkeletonClass parent_class;
+       GkdExportedServiceSkeletonClass parent_class;
 } GkdSecretServiceSkeletonClass;
 
 GType gkd_secret_service_skeleton_get_type (void);
-G_DEFINE_TYPE (GkdSecretServiceSkeleton, gkd_secret_service_skeleton, 
GKD_TYPE_ORG_FREEDESKTOP_SECRET_SERVICE_SKELETON)
+G_DEFINE_TYPE (GkdSecretServiceSkeleton, gkd_secret_service_skeleton, GKD_TYPE_EXPORTED_SERVICE_SKELETON)
 
 enum {
        PROP_COLLECTIONS = 1
@@ -98,7 +98,7 @@ gkd_secret_service_skeleton_class_init (GkdSecretServiceSkeletonClass *klass)
        GObjectClass *oclass = G_OBJECT_CLASS (klass);
        oclass->get_property = gkd_secret_service_skeleton_get_property;
        oclass->set_property = gkd_secret_service_skeleton_set_property;
-       gkd_org_freedesktop_secret_service_override_properties (oclass, PROP_COLLECTIONS);
+       gkd_exported_service_override_properties (oclass, PROP_COLLECTIONS);
 }
 
 static void
@@ -106,10 +106,10 @@ gkd_secret_service_skeleton_init (GkdSecretServiceSkeleton *self)
 {
 }
 
-static GkdOrgFreedesktopSecretService *
+static GkdExportedService *
 gkd_secret_service_skeleton_new (GkdSecretService *service)
 {
-       GkdOrgFreedesktopSecretService *skeleton = g_object_new (gkd_secret_service_skeleton_get_type (), 
NULL);
+       GkdExportedService *skeleton = g_object_new (gkd_secret_service_skeleton_get_type (), NULL);
        ((GkdSecretServiceSkeleton *) skeleton)->service = service;
        return skeleton;
 }
@@ -124,8 +124,8 @@ struct _GkdSecretService {
        GObject parent;
 
        GDBusConnection *connection;
-       GkdOrgFreedesktopSecretService *skeleton;
-       GkdOrgGnomeKeyringInternalUnsupportedGuiltRiddenInterface *internal_skeleton;
+       GkdExportedService *skeleton;
+       GkdExportedInternal *internal_skeleton;
        guint name_owner_id;
        guint filter_id;
 
@@ -362,7 +362,7 @@ service_message_filter (GDBusConnection *connection,
  */
 
 static gboolean
-service_method_open_session (GkdOrgFreedesktopSecretService *skeleton,
+service_method_open_session (GkdExportedService *skeleton,
                             GDBusMethodInvocation *invocation,
                             gchar *algorithm,
                             GVariant *input,
@@ -390,7 +390,7 @@ service_method_open_session (GkdOrgFreedesktopSecretService *skeleton,
        } else {
                gkd_secret_service_publish_dispatch (self, caller,
                                                     GKD_SECRET_DISPATCH (session));
-               gkd_org_freedesktop_secret_service_complete_open_session (skeleton, invocation, output, 
result);
+               gkd_exported_service_complete_open_session (skeleton, invocation, output, result);
                g_free (result);
        }
 
@@ -399,7 +399,7 @@ service_method_open_session (GkdOrgFreedesktopSecretService *skeleton,
 }
 
 static gboolean
-service_method_search_items (GkdOrgFreedesktopSecretService *skeleton,
+service_method_search_items (GkdExportedService *skeleton,
                             GDBusMethodInvocation *invocation,
                             GVariant *attributes,
                             GkdSecretService *self)
@@ -409,7 +409,7 @@ service_method_search_items (GkdOrgFreedesktopSecretService *skeleton,
 }
 
 static gboolean
-service_method_get_secrets (GkdOrgFreedesktopSecretService *skeleton,
+service_method_get_secrets (GkdExportedService *skeleton,
                            GDBusMethodInvocation *invocation,
                            gchar **items,
                            gchar *session,
@@ -420,7 +420,7 @@ service_method_get_secrets (GkdOrgFreedesktopSecretService *skeleton,
 }
 
 static gboolean
-service_method_create_collection (GkdOrgFreedesktopSecretService *skeleton,
+service_method_create_collection (GkdExportedService *skeleton,
                                  GDBusMethodInvocation *invocation,
                                  GVariant *properties,
                                  gchar *alias,
@@ -465,13 +465,13 @@ service_method_create_collection (GkdOrgFreedesktopSecretService *skeleton,
        gkd_secret_service_publish_dispatch (self, caller,
                                             GKD_SECRET_DISPATCH (create));
 
-       gkd_org_freedesktop_secret_service_complete_create_collection (skeleton, invocation,
-                                                                       "/", path);
+       gkd_exported_service_complete_create_collection (skeleton, invocation,
+                                                        "/", path);
        return TRUE;
 }
 
 static gboolean
-service_method_lock_service (GkdOrgFreedesktopSecretService *skeleton,
+service_method_lock_service (GkdExportedService *skeleton,
                             GDBusMethodInvocation *invocation,
                             GkdSecretService *self)
 {
@@ -486,13 +486,13 @@ service_method_lock_service (GkdOrgFreedesktopSecretService *skeleton,
        if (!gkd_secret_lock_all (session, &error))
                g_dbus_method_invocation_take_error (invocation, error);
        else
-               gkd_org_freedesktop_secret_service_complete_lock_service (skeleton, invocation);
+               gkd_exported_service_complete_lock_service (skeleton, invocation);
 
        return TRUE;
 }
 
 static gboolean
-service_method_unlock (GkdOrgFreedesktopSecretService *skeleton,
+service_method_unlock (GkdExportedService *skeleton,
                       GDBusMethodInvocation *invocation,
                       gchar **objpaths,
                       GkdSecretService *self)
@@ -520,8 +520,8 @@ service_method_unlock (GkdOrgFreedesktopSecretService *skeleton,
        }
 
        unlocked = gkd_secret_unlock_get_results (unlock, &n_unlocked);
-       gkd_org_freedesktop_secret_service_complete_unlock (skeleton, invocation,
-                                                           (const gchar **) unlocked, path);
+       gkd_exported_service_complete_unlock (skeleton, invocation,
+                                             (const gchar **) unlocked, path);
 
        gkd_secret_unlock_reset_results (unlock);
        g_object_unref (unlock);
@@ -530,7 +530,7 @@ service_method_unlock (GkdOrgFreedesktopSecretService *skeleton,
 }
 
 static gboolean
-service_method_lock (GkdOrgFreedesktopSecretService *skeleton,
+service_method_lock (GkdExportedService *skeleton,
                     GDBusMethodInvocation *invocation,
                     gchar **objpaths,
                     GkdSecretService *self)
@@ -558,8 +558,8 @@ service_method_lock (GkdOrgFreedesktopSecretService *skeleton,
        g_ptr_array_add (array, NULL);
 
        locked = (gchar **) g_ptr_array_free (array, FALSE);
-       gkd_org_freedesktop_secret_service_complete_lock (skeleton, invocation,
-                                                         (const gchar **) locked, "/");
+       gkd_exported_service_complete_lock (skeleton, invocation,
+                                           (const gchar **) locked, "/");
 
        return TRUE;
 }
@@ -599,7 +599,7 @@ method_change_lock_internal (GkdSecretService *self,
 }
 
 static gboolean
-service_method_change_lock (GkdOrgFreedesktopSecretService *skeleton,
+service_method_change_lock (GkdExportedService *skeleton,
                            GDBusMethodInvocation *invocation,
                            gchar *collection_path,
                            GkdSecretService *self)
@@ -608,7 +608,7 @@ service_method_change_lock (GkdOrgFreedesktopSecretService *skeleton,
 }
 
 static gboolean
-service_method_change_with_prompt (GkdOrgGnomeKeyringInternalUnsupportedGuiltRiddenInterface *skeleton,
+service_method_change_with_prompt (GkdExportedInternal *skeleton,
                                   GDBusMethodInvocation *invocation,
                                   gchar *collection_path,
                                   GkdSecretService *self)
@@ -617,7 +617,7 @@ service_method_change_with_prompt (GkdOrgGnomeKeyringInternalUnsupportedGuiltRid
 }
 
 static gboolean
-service_method_read_alias (GkdOrgFreedesktopSecretService *skeleton,
+service_method_read_alias (GkdExportedService *skeleton,
                           GDBusMethodInvocation *invocation,
                           gchar *alias,
                           GkdSecretService *self)
@@ -645,14 +645,14 @@ service_method_read_alias (GkdOrgFreedesktopSecretService *skeleton,
        if (path == NULL)
                path = g_strdup ("/");
 
-       gkd_org_freedesktop_secret_service_complete_read_alias (skeleton, invocation, path);
+       gkd_exported_service_complete_read_alias (skeleton, invocation, path);
        g_free (path);
 
        return TRUE;
 }
 
 static gboolean
-service_method_set_alias (GkdOrgFreedesktopSecretService *skeleton,
+service_method_set_alias (GkdExportedService *skeleton,
                          GDBusMethodInvocation *invocation,
                          gchar *alias,
                          gchar *path,
@@ -699,13 +699,13 @@ service_method_set_alias (GkdOrgFreedesktopSecretService *skeleton,
        gkd_secret_service_set_alias (self, alias, identifier);
        g_free (identifier);
 
-       gkd_org_freedesktop_secret_service_complete_set_alias (skeleton, invocation);
+       gkd_exported_service_complete_set_alias (skeleton, invocation);
 
        return TRUE;
 }
 
 static gboolean
-service_method_create_with_master_password (GkdOrgGnomeKeyringInternalUnsupportedGuiltRiddenInterface 
*skeleton,
+service_method_create_with_master_password (GkdExportedInternal *skeleton,
                                            GDBusMethodInvocation *invocation,
                                            GVariant *attributes,
                                            GVariant *master,
@@ -750,7 +750,7 @@ service_method_create_with_master_password (GkdOrgGnomeKeyringInternalUnsupporte
        /* Notify the callers that a collection was created */
        gkd_secret_service_emit_collection_created (self, path);
 
-       gkd_org_gnome_keyring_internal_unsupported_guilt_ridden_interface_complete_create_with_master_password
+       gkd_exported_internal_complete_create_with_master_password
                (skeleton, invocation, path);
        g_free (path);
 
@@ -758,7 +758,7 @@ service_method_create_with_master_password (GkdOrgGnomeKeyringInternalUnsupporte
 }
 
 static gboolean
-service_method_change_with_master_password (GkdOrgGnomeKeyringInternalUnsupportedGuiltRiddenInterface 
*skeleton,
+service_method_change_with_master_password (GkdExportedInternal *skeleton,
                                            GDBusMethodInvocation *invocation,
                                            gchar *path,
                                            GVariant *original_variant,
@@ -800,7 +800,7 @@ service_method_change_with_master_password (GkdOrgGnomeKeyringInternalUnsupporte
 
        /* Success */
        else if (gkd_secret_change_with_secrets (collection, NULL, original, master, &error))
-               
gkd_org_gnome_keyring_internal_unsupported_guilt_ridden_interface_complete_change_with_master_password
+               gkd_exported_internal_complete_change_with_master_password
                        (skeleton, invocation);
 
        /* Failure */
@@ -817,7 +817,7 @@ service_method_change_with_master_password (GkdOrgGnomeKeyringInternalUnsupporte
 }
 
 static gboolean
-service_method_unlock_with_master_password (GkdOrgGnomeKeyringInternalUnsupportedGuiltRiddenInterface 
*skeleton,
+service_method_unlock_with_master_password (GkdExportedInternal *skeleton,
                                            GDBusMethodInvocation *invocation,
                                            gchar *path,
                                            GVariant *master_variant,
@@ -849,7 +849,7 @@ service_method_unlock_with_master_password (GkdOrgGnomeKeyringInternalUnsupporte
        /* Success */
        } else if (gkd_secret_unlock_with_secret (collection, master, &error)) {
                gkd_secret_objects_emit_collection_locked (self->objects, collection);
-               
gkd_org_gnome_keyring_internal_unsupported_guilt_ridden_interface_complete_unlock_with_master_password
+               gkd_exported_internal_complete_unlock_with_master_password
                        (skeleton, invocation);
 
        /* Failure */
@@ -958,7 +958,7 @@ gkd_secret_service_constructor (GType type,
        g_signal_connect (self->skeleton, "handle-unlock",
                          G_CALLBACK (service_method_unlock), self);
 
-        self->internal_skeleton = 
gkd_org_gnome_keyring_internal_unsupported_guilt_ridden_interface_skeleton_new ();
+        self->internal_skeleton = gkd_exported_internal_skeleton_new ();
        g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (self->internal_skeleton),
                                           self->connection,
                                          SECRET_SERVICE_PATH, &error);
@@ -1376,8 +1376,8 @@ gkd_secret_service_emit_collection_created (GkdSecretService *self,
        gkd_secret_objects_register_collection (self->objects, collection_path);
 
        collections = gkd_secret_service_get_collections (self);
-       gkd_org_freedesktop_secret_service_set_collections (self->skeleton, (const gchar **) collections);
-       gkd_org_freedesktop_secret_service_emit_collection_created (self->skeleton, collection_path);
+       gkd_exported_service_set_collections (self->skeleton, (const gchar **) collections);
+       gkd_exported_service_emit_collection_created (self->skeleton, collection_path);
 
        g_strfreev (collections);
 }
@@ -1394,8 +1394,8 @@ gkd_secret_service_emit_collection_deleted (GkdSecretService *self,
        gkd_secret_objects_unregister_collection (self->objects, collection_path);
 
        collections = gkd_secret_service_get_collections (self);
-       gkd_org_freedesktop_secret_service_set_collections (self->skeleton, (const gchar **) collections);
-       gkd_org_freedesktop_secret_service_emit_collection_deleted (self->skeleton, collection_path);
+       gkd_exported_service_set_collections (self->skeleton, (const gchar **) collections);
+       gkd_exported_service_emit_collection_deleted (self->skeleton, collection_path);
 
        g_strfreev (collections);
 }
@@ -1407,5 +1407,5 @@ gkd_secret_service_emit_collection_changed (GkdSecretService *self,
        g_return_if_fail (GKD_SECRET_IS_SERVICE (self));
        g_return_if_fail (collection_path != NULL);
 
-       gkd_org_freedesktop_secret_service_emit_collection_changed (self->skeleton, collection_path);
+       gkd_exported_service_emit_collection_changed (self->skeleton, collection_path);
 }
diff --git a/daemon/dbus/gkd-secret-session.c b/daemon/dbus/gkd-secret-session.c
index 834e00c..f879375 100644
--- a/daemon/dbus/gkd-secret-session.c
+++ b/daemon/dbus/gkd-secret-session.c
@@ -50,7 +50,7 @@ struct _GkdSecretSession {
        /* Information about this object */
        gchar *object_path;
        GkdSecretService *service;
-       GkdOrgFreedesktopSecretSession *skeleton;
+       GkdExportedSession *skeleton;
        gchar *caller_exec;
        gchar *caller;
 
@@ -286,12 +286,12 @@ plain_negotiate (GkdSecretSession *self,
  * DBUS
  */
 static gboolean
-session_method_close (GkdOrgFreedesktopSecretSession *skeleton,
+session_method_close (GkdExportedSession *skeleton,
                      GDBusMethodInvocation *invocation,
                      GkdSecretSession *self)
 {
        gkd_secret_service_close_session (self->service, self);
-       gkd_org_freedesktop_secret_session_complete_close (skeleton, invocation);
+       gkd_exported_session_complete_close (skeleton, invocation);
 
        return TRUE;
 }
@@ -312,7 +312,7 @@ gkd_secret_session_constructor (GType type, guint n_props, GObjectConstructParam
        /* Setup the path for the object */
        self->object_path = g_strdup_printf (SECRET_SESSION_PREFIX "/s%d", ++unique_session_number);
 
-       self->skeleton = gkd_org_freedesktop_secret_session_skeleton_new ();
+       self->skeleton = gkd_exported_session_skeleton_new ();
        g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (self->skeleton),
                                          gkd_secret_service_get_connection (self->service),
                                          self->object_path, &error);
diff --git a/daemon/dbus/gkd-secret-unlock.c b/daemon/dbus/gkd-secret-unlock.c
index 290837c..37c4ded 100644
--- a/daemon/dbus/gkd-secret-unlock.c
+++ b/daemon/dbus/gkd-secret-unlock.c
@@ -62,7 +62,7 @@ struct _GkdSecretUnlock {
        GObject parent;
        gchar *object_path;
        GkdSecretService *service;
-       GkdOrgFreedesktopSecretPrompt *skeleton;
+       GkdExportedPrompt *skeleton;
        gchar *caller;
        gchar *window_id;
        GQueue *queued;
@@ -159,9 +159,9 @@ mark_as_complete (GkdSecretUnlock *self, gboolean dismissed)
                g_variant_builder_add (&builder, "o", value);
        }
 
-       gkd_org_freedesktop_secret_prompt_emit_completed (self->skeleton,
-                                                         dismissed,
-                                                         g_variant_new_variant (g_variant_builder_end 
(&builder)));
+       gkd_exported_prompt_emit_completed (self->skeleton,
+                                           dismissed,
+                                           g_variant_new_variant (g_variant_builder_end (&builder)));
 
        /* Fire off the next item in the unlock prompt queue */
        other = g_queue_pop_head (&unlock_prompt_queue);
@@ -299,7 +299,7 @@ perform_next_unlock (GkdSecretUnlock *self)
  */
 
 static gboolean
-prompt_method_prompt (GkdOrgFreedesktopSecretPrompt *skeleton,
+prompt_method_prompt (GkdExportedPrompt *skeleton,
                      GDBusMethodInvocation *invocation,
                      gchar *window_id,
                      GkdSecretUnlock *self)
@@ -319,12 +319,12 @@ prompt_method_prompt (GkdOrgFreedesktopSecretPrompt *skeleton,
 
        gkd_secret_unlock_call_prompt (self, window_id);
 
-       gkd_org_freedesktop_secret_prompt_complete_prompt (skeleton, invocation);
+       gkd_exported_prompt_complete_prompt (skeleton, invocation);
        return TRUE;
 }
 
 static gboolean
-prompt_method_dismiss (GkdOrgFreedesktopSecretPrompt *skeleton,
+prompt_method_dismiss (GkdExportedPrompt *skeleton,
                       GDBusMethodInvocation *invocation,
                       GkdSecretUnlock *self)
 {
@@ -335,7 +335,7 @@ prompt_method_dismiss (GkdOrgFreedesktopSecretPrompt *skeleton,
        g_cancellable_cancel (self->cancellable);
        mark_as_complete (self, TRUE);
 
-       gkd_org_freedesktop_secret_prompt_complete_dismiss (skeleton, invocation);
+       gkd_exported_prompt_complete_dismiss (skeleton, invocation);
        return TRUE;
 }
 
@@ -365,7 +365,7 @@ gkd_secret_unlock_constructor (GType type, guint n_props, GObjectConstructParam
        if (!self->object_path)
                self->object_path = g_strdup_printf (SECRET_PROMPT_PREFIX "/u%d", ++unique_prompt_number);
 
-        self->skeleton = gkd_org_freedesktop_secret_prompt_skeleton_new ();
+        self->skeleton = gkd_exported_prompt_skeleton_new ();
         g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (self->skeleton),
                                           gkd_secret_service_get_connection (self->service), 
self->object_path,
                                           &error);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]