Line data Source code
1 : /*
2 : * gnome-keyring
3 : *
4 : * Copyright (C) 2008 Stefan Walter
5 : *
6 : * This program is free software; you can redistribute it and/or modify
7 : * it under the terms of the GNU Lesser General Public License as
8 : * published by the Free Software Foundation; either version 2.1 of
9 : * the License, or (at your option) any later version.
10 : *
11 : * This program is distributed in the hope that it will be useful, but
12 : * WITHOUT ANY WARRANTY; without even the implied warranty of
13 : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 : * Lesser General Public License for more details.
15 : *
16 : * You should have received a copy of the GNU Lesser General Public
17 : * License along with this program; if not, see
18 : * <http://www.gnu.org/licenses/>.
19 : */
20 :
21 : #include "config.h"
22 :
23 : #include "gkd-secret-dispatch.h"
24 :
25 : static void
26 34 : gkd_secret_dispatch_base_init (gpointer gobject_class)
27 : {
28 : static gsize initialized = 0;
29 34 : if (g_once_init_enter (&initialized)) {
30 16 : g_once_init_leave (&initialized, 1);
31 : }
32 34 : }
33 :
34 : GType
35 56 : gkd_secret_dispatch_get_type (void)
36 : {
37 : static GType type = 0;
38 56 : if (!type) {
39 : static const GTypeInfo info = {
40 : sizeof (GkdSecretDispatchIface),
41 : gkd_secret_dispatch_base_init, /* base init */
42 : NULL, /* base finalize */
43 : NULL, /* class_init */
44 : NULL, /* class finalize */
45 : NULL, /* class data */
46 : 0,
47 : 0, /* n_preallocs */
48 : NULL, /* instance init */
49 : };
50 16 : type = g_type_register_static (G_TYPE_INTERFACE, "GkdSecretDispatchIFace", &info, 0);
51 16 : g_type_interface_add_prerequisite (type, G_TYPE_OBJECT);
52 : }
53 :
54 56 : return type;
55 : }
56 :
57 : const gchar*
58 20 : gkd_secret_dispatch_get_object_path (GkdSecretDispatch *self)
59 : {
60 20 : const gchar *path = NULL;
61 : /* object-path is boxed, no allocation */
62 20 : g_object_get (self, "object-path", &path, NULL);
63 20 : return path;
64 : }
|