[seahorse] mixed dbus related comments
- From: Adam Schreiber <sadam src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [seahorse] mixed dbus related comments
- Date: Wed, 19 Aug 2009 16:20:47 +0000 (UTC)
commit 9789966dcd63523f1afb834eee55869278776576
Author: Thorsten Sick <thorsten sick email de>
Date: Tue Aug 18 18:28:44 2009 +0200
mixed dbus related comments
daemon/seahorse-dbus-server.c | 19 +++++++++++
daemon/seahorse-service-keyset.c | 10 +++++-
daemon/seahorse-service.c | 63 ++++++++++++++++++++++++++++++++++++++
libseahorse/seahorse-context.c | 15 +++++++++
libseahorse/seahorse-source.c | 9 +++++-
5 files changed, 114 insertions(+), 2 deletions(-)
---
diff --git a/daemon/seahorse-dbus-server.c b/daemon/seahorse-dbus-server.c
index bf3cad3..254ba7b 100644
--- a/daemon/seahorse-dbus-server.c
+++ b/daemon/seahorse-dbus-server.c
@@ -42,6 +42,12 @@ SeahorseServiceCrypto *the_crypto = NULL;
#endif
DBusGConnection *connection = NULL;
+/**
+* seahorse_dbus_server_init:
+*
+* Initialisation for the dbus service.
+*
+*/
void
seahorse_dbus_server_init ()
{
@@ -96,12 +102,25 @@ seahorse_dbus_server_init ()
#endif
}
+/**
+* seahorse_dbus_server_get_connection:
+*
+*
+*
+* Returns: The DBus connection #DBusGConnection
+*/
DBusGConnection*
seahorse_dbus_server_get_connection ()
{
return connection;
}
+/**
+* seahorse_dbus_server_cleanup:
+*
+* Cleans up the dbus service
+*
+*/
void
seahorse_dbus_server_cleanup ()
{
diff --git a/daemon/seahorse-service-keyset.c b/daemon/seahorse-service-keyset.c
index 8dc77c7..03e8629 100644
--- a/daemon/seahorse-service-keyset.c
+++ b/daemon/seahorse-service-keyset.c
@@ -382,7 +382,15 @@ seahorse_service_keyset_class_init (SeahorseServiceKeysetClass *klass)
/* -----------------------------------------------------------------------------
* PUBLIC METHODS
*/
-
+
+/**
+* seahorse_service_keyset_new:
+* @ktype: The key type
+* @location: the location of the key
+*
+*
+* Returns: a new keyset of type #SeahorseSet
+*/
SeahorseSet*
seahorse_service_keyset_new (GQuark ktype, SeahorseLocation location)
{
diff --git a/daemon/seahorse-service.c b/daemon/seahorse-service.c
index 4234231..a4bcb8b 100644
--- a/daemon/seahorse-service.c
+++ b/daemon/seahorse-service.c
@@ -43,6 +43,16 @@
G_DEFINE_TYPE (SeahorseService, seahorse_service, G_TYPE_OBJECT);
+/**
+* copy_to_array:
+* @type: a string (#gchar)
+* @dummy: not used
+* @a: an array (#GArray)
+*
+* Adds a copy of @type to @a
+*
+* Returns:
+*/
static void
copy_to_array (const gchar *type, gpointer dummy, GArray *a)
{
@@ -50,6 +60,15 @@ copy_to_array (const gchar *type, gpointer dummy, GArray *a)
g_array_append_val (a, v);
}
+/**
+* add_key_source:
+* @svc: the seahorse context
+* @ktype: the key source to add
+*
+* Adds DBus ids for the keysets. The keysets @ktype of the service will be set to the
+* local keyset.
+*
+*/
static void
add_key_source (SeahorseService *svc, GQuark ktype)
{
@@ -82,6 +101,17 @@ add_key_source (SeahorseService *svc, GQuark ktype)
* DBUS METHODS
*/
+/**
+* seahorse_service_get_key_types:
+* @svc: the seahorse context
+* @ret: the supported keytypes of seahorse
+* @error: an error var, not used
+*
+* DBus: GetKeyTypes
+*
+*
+* Returns: True
+*/
gboolean
seahorse_service_get_key_types (SeahorseService *svc, gchar ***ret,
GError **error)
@@ -101,6 +131,17 @@ seahorse_service_get_key_types (SeahorseService *svc, gchar ***ret,
return TRUE;
}
+/**
+* seahorse_service_get_keyset:
+* @svc: the seahorse context
+* @ktype: the type of the key
+* @path: the path to the keyset
+* @error: set if the key type was not found
+*
+* DBus: GetKeyset
+*
+* Returns: False if there is no matching keyset, True else
+*/
gboolean
seahorse_service_get_keyset (SeahorseService *svc, gchar *ktype,
gchar **path, GError **error)
@@ -285,6 +326,13 @@ seahorse_service_changed (SeahorseContext *sctx, SeahorseObject *sobj, SeahorseS
* OBJECT
*/
+/**
+* seahorse_service_dispose:
+* @gobject:
+*
+* Disposes the seahorse dbus service
+*
+*/
static void
seahorse_service_dispose (GObject *gobject)
{
@@ -300,6 +348,12 @@ seahorse_service_dispose (GObject *gobject)
G_OBJECT_CLASS (seahorse_service_parent_class)->dispose (gobject);
}
+/**
+* seahorse_service_class_init:
+* @klass: The class to init
+*
+*
+*/
static void
seahorse_service_class_init (SeahorseServiceClass *klass)
{
@@ -311,6 +365,15 @@ seahorse_service_class_init (SeahorseServiceClass *klass)
gobject_class->dispose = seahorse_service_dispose;
}
+
+/**
+* seahorse_service_init:
+* @svc:
+*
+*
+* Initialises the service, adds local key sources and connects the signals.
+*
+*/
static void
seahorse_service_init (SeahorseService *svc)
{
diff --git a/libseahorse/seahorse-context.c b/libseahorse/seahorse-context.c
index 842dd53..2d95c4b 100644
--- a/libseahorse/seahorse-context.c
+++ b/libseahorse/seahorse-context.c
@@ -207,6 +207,11 @@ seahorse_context_finalize (GObject *gobject)
G_OBJECT_CLASS (seahorse_context_parent_class)->finalize (gobject);
}
+/**
+* seahorse_context_for_app:
+*
+* Returns: the application main context as #SeahorseContext
+*/
SeahorseContext*
seahorse_context_for_app (void)
{
@@ -362,6 +367,16 @@ seahorse_context_find_source (SeahorseContext *sctx, GQuark ktype,
return NULL;
}
+
+/**
+* seahorse_context_find_sources:
+* @sctx: the context to work with
+* @ktype: the type of the key to match. Or SEAHORSE_TAG_INVALID
+* @location: the location to match. Or SEAHORSE_LOCATION_INVALID
+*
+* Returns: A list of seahorse sources matching @ktype and @location as #GSList. Must
+* be freed with #g_slist_free
+*/
GSList*
seahorse_context_find_sources (SeahorseContext *sctx, GQuark ktype,
SeahorseLocation location)
diff --git a/libseahorse/seahorse-source.c b/libseahorse/seahorse-source.c
index c2b6d0d..7d17d49 100644
--- a/libseahorse/seahorse-source.c
+++ b/libseahorse/seahorse-source.c
@@ -334,7 +334,14 @@ seahorse_source_export_raw (SeahorseSource *sksrc, GSList *ids, GOutputStream *o
g_list_free (objects);
return op;
}
-
+
+/**
+* seahorse_source_get_tag:
+* @sksrc: The seahorse source object
+*
+*
+* Returns: The source-tag property of the object. As #GQuark
+*/
GQuark
seahorse_source_get_tag (SeahorseSource *sksrc)
{
diff --git a/tests/dbus-match-test.py b/tests/dbus-match-test.py
old mode 100644
new mode 100755
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]