diff options
author | Stef Walter <stefw@collabora.co.uk> | 2011-09-28 14:24:43 +0200 |
---|---|---|
committer | Stef Walter <stefw@collabora.co.uk> | 2011-09-28 14:28:38 +0200 |
commit | 34fd5215bdc064247409acc4e1fce892450b8e51 (patch) | |
tree | 00a6fcbac8f0b1a3bfa44b0759d945905f7f5ab7 /gck/gck-uri.c | |
parent | 007e09a075927b6ab5095ea60278ed1cd91c8397 (diff) | |
download | gcr-34fd5215bdc064247409acc4e1fce892450b8e51.tar.gz |
gck: Fix introspection warnings and complete introspection annotations
https://bugzilla.gnome.org/show_bug.cgi?id=655651
Diffstat (limited to 'gck/gck-uri.c')
-rw-r--r-- | gck/gck-uri.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/gck/gck-uri.c b/gck/gck-uri.c index 35cbe6b..c083529 100644 --- a/gck/gck-uri.c +++ b/gck/gck-uri.c @@ -105,6 +105,13 @@ struct _GckUri { GQuark gck_uri_get_error_quark (void) { + /* This is deprecated version */ + return gck_uri_get_error_quark (); +} + +GQuark +gck_uri_error_get_quark (void) +{ static GQuark domain = 0; static volatile gsize quark_inited = 0; @@ -259,6 +266,41 @@ gck_uri_build (GckUriData *uri_data, GckUriFlags flags) return string; } +GType +gck_uri_data_get_type (void) +{ + static volatile gsize initialized = 0; + static GType type = 0; + if (g_once_init_enter (&initialized)) { + type = g_boxed_type_register_static ("GckUriData", + (GBoxedCopyFunc)gck_uri_data_copy, + (GBoxedFreeFunc)gck_uri_data_free); + g_once_init_leave (&initialized, 1); + } + return type; +} + +/** + * gck_uri_data_copy: + * @uri_data: URI data to copy + * + * Copy a #GckUriData + * + * Returns: (transfer full): newly allocated copy of the uri data + */ +GckUriData * +gck_uri_data_copy (GckUriData *uri_data) +{ + GckUriData *copy; + + copy = g_memdup (uri_data, sizeof (GckUriData)); + copy->attributes = gck_attributes_new (); + gck_attributes_add_all (copy->attributes, uri_data->attributes); + copy->module_info = gck_module_info_copy (copy->module_info); + copy->token_info = gck_token_info_copy (copy->token_info); + return copy; +} + /** * gck_uri_data_free: * @uri_data: URI data to free. |