annotate plugins/dbus-example.c @ 13588:bbf2e601be82

[gaim-migrate @ 15973] this should make configure _NOT_ fail on systems where dbus isn't installed. It's a bit messy buy should work fine.. committer: Tailor Script <tailor@pidgin.im>
author Gary Kramlich <grim@reaperworld.com>
date Thu, 06 Apr 2006 22:28:22 +0000
parents a7b24ba66570
children 2d6f7ac4b6f2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13555
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
1 /*
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
2 * This is an example of a gaim dbus plugin. After enabling this
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
3 * plugin, the following commands should work from the command line:
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
4 *
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
5 * prompt$ gaim-send DbusExampleGetHelloObject
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
6 *
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
7 * returns, say: int32 74
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
8 *
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
9 * prompt$ gaim-send DbusExampleGetText int32:74
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
10 *
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
11 * returns: string "Hello."
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
12 *
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
13 * prompt$ gaim-send DbusExampleSetText int32:74 string:Bye!
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
14 *
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
15 * prompt$ gaim-send DbusExampleGetText int32:74
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
16 *
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
17 * returns: string "Bye!"
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
18 *
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
19 * Gaim is the legal property of its developers, whose names are too numerous
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
20 * to list here. Please refer to the COPYRIGHT file distributed with this
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
21 * source distribution.
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
22 *
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
23 * This program is free software; you can redistribute it and/or modify
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
24 * it under the terms of the GNU General Public License as published by
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
25 * the Free Software Foundation; either version 2 of the License, or
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
26 * (at your option) any later version.
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
27 *
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
28 * This program is distributed in the hope that it will be useful,
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
29 * but WITHOUT ANY WARRANTY; without even the implied warranty of
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
30 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
31 * GNU General Public License for more details.
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
32 *
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
33 * You should have received a copy of the GNU General Public License
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
34 * along with this program; if not, write to the Free Software
a7b24ba66570 [gaim-migrate @ 15933]
Richard Laager <rlaager@wiktel.com>
parents: 11200
diff changeset
35 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
11173
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
36 */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
37
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
38 #include "internal.h"
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
39
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
40 #include "plugin.h"
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
41 #include "blist.h"
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
42 #include "version.h"
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
43
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
44 #include <stdio.h>
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
45 #include <stdlib.h>
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
46 #include <string.h>
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
47
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
48 #define DBUS_API_SUBJECT_TO_CHANGE
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
49 #include "dbus-maybe.h"
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
50 #include "dbus-bindings.h"
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
51
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
52 typedef struct {
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
53 char *text;
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
54 } GaimText;
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
55
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
56 /* This makes the structure GaimText visible to the gaim-dbus type
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
57 system. It defines GaimText as a type with no parent. From now
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
58 on, we will be able to register pointers to structures of this
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
59 type. You to dbus-define types you want to be directly accessible
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
60 by external applications. */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
61 GAIM_DBUS_DEFINE_TYPE(GaimText)
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
62
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
63 /* Here we make four functions accessible to other applications by
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
64 DBus. These functions can access types defined in gaim proper
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
65 (GaimBuddy) as well as the types defined in the plugin (GaimText). */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
66 DBUS_EXPORT GaimText* dbus_example_get_hello_object(void);
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
67 DBUS_EXPORT void dbus_example_set_text(GaimText *obj, const char *text);
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
68 DBUS_EXPORT const char *dbus_example_get_text(GaimText *obj);
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
69 DBUS_EXPORT const char *dbus_example_get_buddy_name(GaimBuddy *buddy);
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
70
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
71 /* This file has been generated by the #dbus-analize-functions.py
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
72 script. It contains dbus wrappers for the four functions declared
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
73 above. */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
74 #include "dbus-example-bindings.c"
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
75
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
76 /* This is the GaimText object we want to make publicly visible. */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
77 static GaimText hello;
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
78
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
79 /* Here come the definitions of the four exported functions. */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
80 GaimText* dbus_example_get_hello_object(void)
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
81 {
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
82 return &hello;
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
83 }
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
84
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
85 void dbus_example_set_text(GaimText *obj, const char *text)
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
86 {
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
87 if (obj != NULL) {
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
88 g_free(obj->text);
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
89 obj->text = g_strdup(text);
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
90 }
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
91 }
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
92
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
93 const char *dbus_example_get_text(GaimText *obj)
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
94 {
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
95 if (obj != NULL)
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
96 return obj->text;
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
97 else
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
98 return NULL;
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
99 }
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
100
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
101 const char *dbus_example_get_buddy_name(GaimBuddy *buddy)
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
102 {
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
103 return gaim_buddy_get_name(buddy);
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
104 }
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
105
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
106 /* And now standard plugin stuff */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
107
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
108 static gboolean
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
109 plugin_load(GaimPlugin *plugin)
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
110 {
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
111 /* First, we have to register our four exported functions with the
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
112 main gaim dbus loop. Without this statement, the gaim dbus
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
113 code wouldn't know about our functions. */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
114 GAIM_DBUS_REGISTER_BINDINGS(plugin);
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
115
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
116 /* Then, we register the hello object of type GaimText. Note that
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
117 pointer registrations / unregistrations are completely dynamic;
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
118 they don't have to be made when the plugin is loaded /
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
119 unloaded. Without this statement the dbus gaim code wouldn't
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
120 know about the hello object. */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
121 GAIM_DBUS_REGISTER_POINTER(&hello, GaimText);
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
122
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
123 hello.text = g_strdup("Hello.");
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
124
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
125 return TRUE;
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
126 }
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
127
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
128
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
129 static gboolean
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
130 plugin_unload(GaimPlugin *plugin)
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
131 {
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
132 g_free(hello.text);
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
133
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
134 /* It is necessary to unregister all pointers registered by the module. */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
135 GAIM_DBUS_UNREGISTER_POINTER(&hello);
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
136
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
137 return TRUE;
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
138 }
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
139
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
140 static GaimPluginInfo info =
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
141 {
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
142 GAIM_PLUGIN_MAGIC,
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
143 GAIM_MAJOR_VERSION,
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
144 GAIM_MINOR_VERSION,
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
145 GAIM_PLUGIN_STANDARD, /**< type */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
146 NULL, /**< ui_requirement */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
147 0, /**< flags */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
148 NULL, /**< dependencies */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
149 GAIM_PRIORITY_DEFAULT, /**< priority */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
150
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
151 "dbus-example", /**< id */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
152 N_("DBus"), /**< name */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
153 VERSION, /**< version */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
154 /** summary */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
155 N_("DBus Plugin Example"),
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
156 /** description */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
157 N_("DBus Plugin Example"),
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
158 "Piotr Zielinski (http://cl.cam.ac.uk/~pz215)", /**< author */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
159 GAIM_WEBSITE, /**< homepage */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
160
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
161 plugin_load, /**< load */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
162 plugin_unload, /**< unload */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
163 NULL, /**< destroy */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
164
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
165 NULL, /**< ui_info */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
166 NULL, /**< extra_info */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
167 NULL, /**< prefs_info */
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
168 NULL
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
169 };
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
170
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
171 static void init_plugin(GaimPlugin *plugin)
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
172 {
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
173 }
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
174
91ca67258564 [gaim-migrate @ 13278]
Piotr Zielinski <zielaj>
parents:
diff changeset
175 GAIM_INIT_PLUGIN(dbus_example, init_plugin, info)