Wed, 16 Apr 2014 12:04:51 +0530
Merge default branch
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
1 | /* purple |
|
11055
e564996853bf
[gaim-migrate @ 12996]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff
changeset
|
2 | * |
| 15884 | 3 | * Purple is the legal property of its developers, whose names are too numerous |
|
11055
e564996853bf
[gaim-migrate @ 12996]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff
changeset
|
4 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
e564996853bf
[gaim-migrate @ 12996]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff
changeset
|
5 | * source distribution. |
|
e564996853bf
[gaim-migrate @ 12996]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff
changeset
|
6 | * |
|
e564996853bf
[gaim-migrate @ 12996]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff
changeset
|
7 | * This program is free software; you can redistribute it and/or modify |
|
e564996853bf
[gaim-migrate @ 12996]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff
changeset
|
8 | * it under the terms of the GNU General Public License as published by |
|
e564996853bf
[gaim-migrate @ 12996]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff
changeset
|
9 | * the Free Software Foundation; either version 2 of the License, or |
|
e564996853bf
[gaim-migrate @ 12996]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff
changeset
|
10 | * (at your option) any later version. |
|
e564996853bf
[gaim-migrate @ 12996]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff
changeset
|
11 | * |
|
e564996853bf
[gaim-migrate @ 12996]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff
changeset
|
12 | * This program is distributed in the hope that it will be useful, |
|
e564996853bf
[gaim-migrate @ 12996]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff
changeset
|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
e564996853bf
[gaim-migrate @ 12996]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff
changeset
|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
e564996853bf
[gaim-migrate @ 12996]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff
changeset
|
15 | * GNU General Public License for more details. |
|
e564996853bf
[gaim-migrate @ 12996]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff
changeset
|
16 | * |
|
e564996853bf
[gaim-migrate @ 12996]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff
changeset
|
17 | * You should have received a copy of the GNU General Public License |
|
e564996853bf
[gaim-migrate @ 12996]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff
changeset
|
18 | * along with this program; if not, write to the Free Software |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
18412
diff
changeset
|
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
11055
e564996853bf
[gaim-migrate @ 12996]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff
changeset
|
20 | */ |
|
35487
494f09f7f331
Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents:
35467
diff
changeset
|
21 | |
|
494f09f7f331
Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents:
35467
diff
changeset
|
22 | #ifndef _PURPLE_DBUS_SERVER_H_ |
|
494f09f7f331
Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents:
35467
diff
changeset
|
23 | #define _PURPLE_DBUS_SERVER_H_ |
|
35437
1f82cf8c8378
Add section blocks for conversation.h to dbus-server.h
Ankit Vani <a@nevitus.org>
parents:
35397
diff
changeset
|
24 | /** |
|
1f82cf8c8378
Add section blocks for conversation.h to dbus-server.h
Ankit Vani <a@nevitus.org>
parents:
35397
diff
changeset
|
25 | * SECTION:dbus-server |
|
1f82cf8c8378
Add section blocks for conversation.h to dbus-server.h
Ankit Vani <a@nevitus.org>
parents:
35397
diff
changeset
|
26 | * @section_id: libpurple-dbus-server |
|
1f82cf8c8378
Add section blocks for conversation.h to dbus-server.h
Ankit Vani <a@nevitus.org>
parents:
35397
diff
changeset
|
27 | * @short_description: <filename>dbus-server.h</filename> |
|
1f82cf8c8378
Add section blocks for conversation.h to dbus-server.h
Ankit Vani <a@nevitus.org>
parents:
35397
diff
changeset
|
28 | * @title: DBUS Server |
|
1f82cf8c8378
Add section blocks for conversation.h to dbus-server.h
Ankit Vani <a@nevitus.org>
parents:
35397
diff
changeset
|
29 | * @see_also: <link linkend="chapter-signals-dbus-server">D-Bus Server signals</link> |
|
1f82cf8c8378
Add section blocks for conversation.h to dbus-server.h
Ankit Vani <a@nevitus.org>
parents:
35397
diff
changeset
|
30 | */ |
|
11055
e564996853bf
[gaim-migrate @ 12996]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff
changeset
|
31 | |
|
22872
41d80fc58db2
Pop up the buddylist of the running instance instead of exiting quietly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
32 | #include "dbus-purple.h" |
|
11067
b6353889a9ba
[gaim-migrate @ 13048]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11055
diff
changeset
|
33 | |
|
11055
e564996853bf
[gaim-migrate @ 12996]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff
changeset
|
34 | G_BEGIN_DECLS |
|
e564996853bf
[gaim-migrate @ 12996]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff
changeset
|
35 | |
|
35493
62d9335e57ba
Move comment to the right place
Ankit Vani <a@nevitus.org>
parents:
35487
diff
changeset
|
36 | typedef struct _PurpleDBusType PurpleDBusType; |
|
62d9335e57ba
Move comment to the right place
Ankit Vani <a@nevitus.org>
parents:
35487
diff
changeset
|
37 | |
|
14097
0c340861ab79
[gaim-migrate @ 16638]
Mark Doliner <markdoliner@pidgin.im>
parents:
14018
diff
changeset
|
38 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
39 | * PurpleDBusType: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
40 | * |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
41 | * Types of pointers are identified by the ADDRESS of a PurpleDbusType |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
42 | * object. This way, plugins can easily access types defined in purple |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
43 | * proper as well as introduce their own types that will not conflict |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
44 | * with those introduced by other plugins. |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
45 | * |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
46 | * The structure PurpleDbusType has only one element (PurpleDBusType::parent), a |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
47 | * contains a pointer to the parent type, or %NULL if the type has no |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
48 | * parent. Parent means the same as the base class in object oriented |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
49 | * programming. |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
50 | */ |
| 15884 | 51 | struct _PurpleDBusType { |
| 52 | PurpleDBusType *parent; | |
|
11171
a25653d60f9c
[gaim-migrate @ 13272]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11146
diff
changeset
|
53 | }; |
|
11067
b6353889a9ba
[gaim-migrate @ 13048]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11055
diff
changeset
|
54 | |
|
22872
41d80fc58db2
Pop up the buddylist of the running instance instead of exiting quietly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
55 | #include "dbus-bindings.h" |
|
41d80fc58db2
Pop up the buddylist of the running instance instead of exiting quietly
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
56 | |
| 15884 | 57 | /* By convention, the PurpleDBusType variable representing each structure |
| 58 | PurpleSomeStructure has the name PURPLE_DBUS_TYPE_PurpleSomeStructure. | |
|
11171
a25653d60f9c
[gaim-migrate @ 13272]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11146
diff
changeset
|
59 | The following macros facilitate defining such variables |
|
11067
b6353889a9ba
[gaim-migrate @ 13048]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11055
diff
changeset
|
60 | |
| 15884 | 61 | #PURPLE_DBUS_DECLARE_TYPE declares an extern variable representing a |
|
11171
a25653d60f9c
[gaim-migrate @ 13272]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11146
diff
changeset
|
62 | given type, for use in header files. |
|
a25653d60f9c
[gaim-migrate @ 13272]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11146
diff
changeset
|
63 | |
| 15884 | 64 | #PURPLE_DBUS_DEFINE_TYPE defines a variable representing a given |
|
11171
a25653d60f9c
[gaim-migrate @ 13272]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11146
diff
changeset
|
65 | type, use in .c files. It defines a new type without a parent; for |
| 15884 | 66 | types with a parent use #PURPLE_DBUS_DEFINE_INHERITING_TYPE. |
|
11171
a25653d60f9c
[gaim-migrate @ 13272]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11146
diff
changeset
|
67 | */ |
|
11080
0578003800d0
[gaim-migrate @ 13092]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11067
diff
changeset
|
68 | |
| 15884 | 69 | #define PURPLE_DBUS_TYPE(type) (&PURPLE_DBUS_TYPE_##type) |
|
11171
a25653d60f9c
[gaim-migrate @ 13272]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11146
diff
changeset
|
70 | |
|
a25653d60f9c
[gaim-migrate @ 13272]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11146
diff
changeset
|
71 | |
| 15884 | 72 | #define PURPLE_DBUS_DECLARE_TYPE(type) \ |
| 73 | extern PurpleDBusType PURPLE_DBUS_TYPE_##type; | |
|
11067
b6353889a9ba
[gaim-migrate @ 13048]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11055
diff
changeset
|
74 | |
| 15884 | 75 | #define PURPLE_DBUS_DEFINE_TYPE(type) \ |
| 76 | PurpleDBusType PURPLE_DBUS_TYPE_##type = { NULL }; | |
|
11080
0578003800d0
[gaim-migrate @ 13092]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11067
diff
changeset
|
77 | |
| 15884 | 78 | #define PURPLE_DBUS_DEFINE_INHERITING_TYPE(type, parent) \ |
| 79 | PurpleDBusType PURPLE_DBUS_TYPE_##type = { PURPLE_DBUS_TYPE(parent) }; | |
|
11171
a25653d60f9c
[gaim-migrate @ 13272]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11146
diff
changeset
|
80 | |
| 15884 | 81 | #define PURPLE_DBUS_RETURN_FALSE_IF_DISABLED(plugin) \ |
| 82 | if (purple_dbus_get_init_error() != NULL) \ | |
|
14018
0d82c17d8000
[gaim-migrate @ 16505]
Mark Doliner <markdoliner@pidgin.im>
parents:
14017
diff
changeset
|
83 | { \ |
|
0d82c17d8000
[gaim-migrate @ 16505]
Mark Doliner <markdoliner@pidgin.im>
parents:
14017
diff
changeset
|
84 | gchar *title; \ |
|
36747
0b84912ce764
Refactored rest of libpurple C plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34807
diff
changeset
|
85 | title = g_strdup_printf("Unable to Load %s Plugin", \ |
|
0b84912ce764
Refactored rest of libpurple C plugins to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
34807
diff
changeset
|
86 | purple_plugin_info_get_name(purple_plugin_get_info(plugin))); \ |
| 15884 | 87 | purple_notify_error(NULL, title, \ |
| 88 | _("Purple's D-BUS server is not running for the reason listed below"), \ | |
|
34449
bbcb198650b7
Notify API: extend purple_notify_message with PurpleRequestCommonParameters
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
32438
diff
changeset
|
89 | _(purple_dbus_get_init_error()), NULL); \ |
|
14018
0d82c17d8000
[gaim-migrate @ 16505]
Mark Doliner <markdoliner@pidgin.im>
parents:
14017
diff
changeset
|
90 | g_free(title); \ |
|
0d82c17d8000
[gaim-migrate @ 16505]
Mark Doliner <markdoliner@pidgin.im>
parents:
14017
diff
changeset
|
91 | return FALSE; \ |
|
0d82c17d8000
[gaim-migrate @ 16505]
Mark Doliner <markdoliner@pidgin.im>
parents:
14017
diff
changeset
|
92 | } |
|
11055
e564996853bf
[gaim-migrate @ 12996]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff
changeset
|
93 | |
|
11067
b6353889a9ba
[gaim-migrate @ 13048]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11055
diff
changeset
|
94 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
95 | * purple_dbus_init_ids: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
96 | * |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
97 | * Initializes purple dbus pointer registration engine. |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
98 | * |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
99 | * Remote dbus applications need a way of addressing objects exposed |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
100 | * by purple to the outside world. In purple itself, these objects (such |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
101 | * as PurpleBuddy and company) are identified by pointers. The purple |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
102 | * dbus pointer registration engine converts pointers to handles and |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
103 | * back. |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
104 | * |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
105 | * In order for an object to participate in the scheme, it must |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
106 | * register itself and its type with the engine. This registration |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
107 | * allocates an integer id which can be resolved to the pointer and |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
108 | * back. |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
109 | * |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
110 | * Handles are not persistent. They are reissued every time purple is |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
111 | * started. This is not good; external applications that use purple |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
112 | * should work even whether purple was restarted in the middle of the |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
113 | * interaction. |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
114 | * |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
115 | * Pointer registration is only a temporary solution. When PurpleBuddy |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
116 | * and similar structures have been converted into gobjects, this |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
117 | * registration will be done automatically by objects themselves. |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
118 | * |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
119 | * By the way, this kind of object-handle translation should be so |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
120 | * common that there must be a library (maybe even glib) that |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
121 | * implements it. I feel a bit like reinventing the wheel here. |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
122 | */ |
| 15884 | 123 | void purple_dbus_init_ids(void); |
|
11067
b6353889a9ba
[gaim-migrate @ 13048]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11055
diff
changeset
|
124 | |
|
14097
0c340861ab79
[gaim-migrate @ 16638]
Mark Doliner <markdoliner@pidgin.im>
parents:
14018
diff
changeset
|
125 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
126 | * purple_dbus_register_pointer: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
127 | * @node: The pointer to register. |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
128 | * @type: Type of that pointer. |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
129 | * |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
130 | * Registers a typed pointer. |
|
11067
b6353889a9ba
[gaim-migrate @ 13048]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11055
diff
changeset
|
131 | */ |
| 15884 | 132 | void purple_dbus_register_pointer(gpointer node, PurpleDBusType *type); |
|
11067
b6353889a9ba
[gaim-migrate @ 13048]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11055
diff
changeset
|
133 | |
|
14097
0c340861ab79
[gaim-migrate @ 16638]
Mark Doliner <markdoliner@pidgin.im>
parents:
14018
diff
changeset
|
134 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
135 | * purple_dbus_unregister_pointer: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
136 | * @node: The pointer to register. |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
137 | * |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
138 | * Unregisters a pointer previously registered with |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
139 | * purple_dbus_register_pointer. |
|
11067
b6353889a9ba
[gaim-migrate @ 13048]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11055
diff
changeset
|
140 | */ |
| 15884 | 141 | void purple_dbus_unregister_pointer(gpointer node); |
|
11067
b6353889a9ba
[gaim-migrate @ 13048]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11055
diff
changeset
|
142 | |
|
11080
0578003800d0
[gaim-migrate @ 13092]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11067
diff
changeset
|
143 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
144 | * purple_dbus_signal_emit_purple: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
145 | * @name: The name of the signal ("bla-bla-blaa") |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
146 | * @num_values: The number of parameters. |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
147 | * @types: Array of GTypes representing the types of the parameters. |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
148 | * @vargs: A va_list containing the actual parameters. |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
149 | * |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
150 | * Emits a dbus signal. |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
151 | */ |
| 15884 | 152 | void purple_dbus_signal_emit_purple(const char *name, int num_values, |
|
34807
9cfac32ace9a
Replaced PurpleValue with GType in dbus-server.h
Ankit Vani <a@nevitus.org>
parents:
34799
diff
changeset
|
153 | GType *types, va_list vargs); |
|
11080
0578003800d0
[gaim-migrate @ 13092]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11067
diff
changeset
|
154 | |
|
11171
a25653d60f9c
[gaim-migrate @ 13272]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11146
diff
changeset
|
155 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
156 | * purple_dbus_get_init_error: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
157 | * |
| 15884 | 158 | * Returns whether Purple's D-BUS subsystem is up and running. If it's |
|
35467
975ae62dd895
Fix cross-references and some other warnings
Ankit Vani <a@nevitus.org>
parents:
35437
diff
changeset
|
159 | * NOT running then #purple_dbus_dispatch_init failed for some reason, |
| 15884 | 160 | * and a message should have been purple_debug_error()'ed. |
|
14017
db3f1bdc95c6
[gaim-migrate @ 16503]
Mark Doliner <markdoliner@pidgin.im>
parents:
13785
diff
changeset
|
161 | * |
| 15884 | 162 | * Purple plugins that use D-BUS should use the |
| 163 | * PURPLE_DBUS_RETURN_FALSE_IF_DISABLED macro to short-circuit | |
| 164 | * initialization if Purple's D-BUS subsystem is not running. | |
|
11171
a25653d60f9c
[gaim-migrate @ 13272]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11146
diff
changeset
|
165 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
34955
diff
changeset
|
166 | * Returns: If the D-BUS subsystem started with no problems then this |
|
35467
975ae62dd895
Fix cross-references and some other warnings
Ankit Vani <a@nevitus.org>
parents:
35437
diff
changeset
|
167 | * will return NULL and everything will be hunky dory. If |
|
975ae62dd895
Fix cross-references and some other warnings
Ankit Vani <a@nevitus.org>
parents:
35437
diff
changeset
|
168 | * there was an error initializing the D-BUS subsystem then |
|
975ae62dd895
Fix cross-references and some other warnings
Ankit Vani <a@nevitus.org>
parents:
35437
diff
changeset
|
169 | * this will return an error message explaining why. |
|
11171
a25653d60f9c
[gaim-migrate @ 13272]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11146
diff
changeset
|
170 | */ |
| 15884 | 171 | const char *purple_dbus_get_init_error(void); |
|
11080
0578003800d0
[gaim-migrate @ 13092]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11067
diff
changeset
|
172 | |
|
12627
fa4c64a821d2
[gaim-migrate @ 14963]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
11903
diff
changeset
|
173 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
174 | * purple_dbus_get_handle: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
175 | * |
|
12627
fa4c64a821d2
[gaim-migrate @ 14963]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
11903
diff
changeset
|
176 | * Returns the dbus subsystem handle. |
|
fa4c64a821d2
[gaim-migrate @ 14963]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
11903
diff
changeset
|
177 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
34955
diff
changeset
|
178 | * Returns: The dbus subsystem handle. |
|
12627
fa4c64a821d2
[gaim-migrate @ 14963]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
11903
diff
changeset
|
179 | */ |
| 15884 | 180 | void *purple_dbus_get_handle(void); |
|
11080
0578003800d0
[gaim-migrate @ 13092]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11067
diff
changeset
|
181 | |
|
11171
a25653d60f9c
[gaim-migrate @ 13272]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11146
diff
changeset
|
182 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
183 | * purple_dbus_is_owner: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
184 | * |
|
17121
43d41f5ce17b
Alternative dbus_uniq implementation
Gabriel Schulhof <nix@go-nix.ca>
parents:
15884
diff
changeset
|
185 | * Determines whether this instance owns the DBus service name |
|
43d41f5ce17b
Alternative dbus_uniq implementation
Gabriel Schulhof <nix@go-nix.ca>
parents:
15884
diff
changeset
|
186 | */ |
|
18080
92fb9192dca9
Add void to the purple_dbus_is_owner() prototype.
Richard Laager <rlaager@pidgin.im>
parents:
18072
diff
changeset
|
187 | gboolean purple_dbus_is_owner(void); |
|
17121
43d41f5ce17b
Alternative dbus_uniq implementation
Gabriel Schulhof <nix@go-nix.ca>
parents:
15884
diff
changeset
|
188 | |
|
43d41f5ce17b
Alternative dbus_uniq implementation
Gabriel Schulhof <nix@go-nix.ca>
parents:
15884
diff
changeset
|
189 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
190 | * purple_dbus_init: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
191 | * |
| 15884 | 192 | * Starts Purple's D-BUS server. It is responsible for handling DBUS |
|
14017
db3f1bdc95c6
[gaim-migrate @ 16503]
Mark Doliner <markdoliner@pidgin.im>
parents:
13785
diff
changeset
|
193 | * requests from other applications. |
|
db3f1bdc95c6
[gaim-migrate @ 16503]
Mark Doliner <markdoliner@pidgin.im>
parents:
13785
diff
changeset
|
194 | */ |
| 15884 | 195 | void purple_dbus_init(void); |
|
14017
db3f1bdc95c6
[gaim-migrate @ 16503]
Mark Doliner <markdoliner@pidgin.im>
parents:
13785
diff
changeset
|
196 | |
|
db3f1bdc95c6
[gaim-migrate @ 16503]
Mark Doliner <markdoliner@pidgin.im>
parents:
13785
diff
changeset
|
197 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
198 | * purple_dbus_uninit: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
199 | * |
| 15884 | 200 | * Uninitializes Purple's D-BUS server. |
|
14017
db3f1bdc95c6
[gaim-migrate @ 16503]
Mark Doliner <markdoliner@pidgin.im>
parents:
13785
diff
changeset
|
201 | */ |
| 15884 | 202 | void purple_dbus_uninit(void); |
|
14017
db3f1bdc95c6
[gaim-migrate @ 16503]
Mark Doliner <markdoliner@pidgin.im>
parents:
13785
diff
changeset
|
203 | |
|
db3f1bdc95c6
[gaim-migrate @ 16503]
Mark Doliner <markdoliner@pidgin.im>
parents:
13785
diff
changeset
|
204 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
205 | * DBUS_EXPORT: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
206 | * |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
207 | * Macro #DBUS_EXPORT expands to nothing. It is used to indicate to the |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
208 | * dbus-analyze-functions.py script that the given function should be |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
209 | * available to other applications through DBUS. If |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
210 | * dbus-analyze-functions.py is run without the "--export-only" option, |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
211 | * this prefix is ignored. |
|
11171
a25653d60f9c
[gaim-migrate @ 13272]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11146
diff
changeset
|
212 | */ |
|
35854
ed4fd1030878
cross-win32: fix libpurple code warnings and errors
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35493
diff
changeset
|
213 | #ifndef DBUS_EXPORT |
|
11171
a25653d60f9c
[gaim-migrate @ 13272]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11146
diff
changeset
|
214 | #define DBUS_EXPORT |
|
35854
ed4fd1030878
cross-win32: fix libpurple code warnings and errors
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35493
diff
changeset
|
215 | #endif |
|
11171
a25653d60f9c
[gaim-migrate @ 13272]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11146
diff
changeset
|
216 | |
|
14097
0c340861ab79
[gaim-migrate @ 16638]
Mark Doliner <markdoliner@pidgin.im>
parents:
14018
diff
changeset
|
217 | /* |
| 15884 | 218 | Here we include the list of #PURPLE_DBUS_DECLARE_TYPE statements for |
| 219 | all structs defined in purple. This file has been generated by the | |
|
27567
f244e3da2459
s/analize/analyze/g since those scripts just don't exist.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
25888
diff
changeset
|
220 | #dbus-analyze-types.py script. |
|
11171
a25653d60f9c
[gaim-migrate @ 13272]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11146
diff
changeset
|
221 | */ |
|
a25653d60f9c
[gaim-migrate @ 13272]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11146
diff
changeset
|
222 | |
|
a25653d60f9c
[gaim-migrate @ 13272]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11146
diff
changeset
|
223 | #include "dbus-types.h" |
|
11067
b6353889a9ba
[gaim-migrate @ 13048]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
11055
diff
changeset
|
224 | |
|
11055
e564996853bf
[gaim-migrate @ 12996]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff
changeset
|
225 | G_END_DECLS |
|
e564996853bf
[gaim-migrate @ 12996]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff
changeset
|
226 | |
| 15884 | 227 | #endif /* _PURPLE_DBUS_SERVER_H_ */ |