annotate libpurple/plugins/notify_example.c @ 32776:8c71a7e95f16

The PurpleConnection->inpa handle is now stored (if needed) within each protocol prpl's protocol_data.
author andrew.victor@mxit.com
date Tue, 18 Oct 2011 21:44:25 +0000
parents 3cc856ca2338
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19913
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
1 /*
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
2 * Notify API Example Plugin
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
3 *
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
4 * Copyright (C) 2007, John Bailey <rekkanoryo@cpw.pidgin.im>
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
5 *
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
6 * This program is free software; you can redistribute it and/or
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
7 * modify it under the terms of the GNU General Public License as
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
8 * published by the Free Software Foundation; either version 2 of the
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
9 * License, or (at your option) any later version.
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
10 *
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
11 * This program is distributed in the hope that it will be useful, but
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
14 * General Public License for more details.
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
15 *
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
17 * along with this program; if not, write to the Free Software
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
19 * 02111-1301, USA.
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
20 *
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
21 */
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
22
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
23 #ifdef HAVE_CONFIG_H
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
24 # include <config.h>
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
25 #endif
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
26
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
27 #include <glib.h>
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
28
20101
3a5f152e7ed0 This fixes compilation issues where old glib and either an old gcc or a
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20003
diff changeset
29 /* This will prevent compiler errors in some instances and is better explained in the
3a5f152e7ed0 This fixes compilation issues where old glib and either an old gcc or a
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20003
diff changeset
30 * how-to documents on the wiki */
3a5f152e7ed0 This fixes compilation issues where old glib and either an old gcc or a
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20003
diff changeset
31 #ifndef G_GNUC_NULL_TERMINATED
3a5f152e7ed0 This fixes compilation issues where old glib and either an old gcc or a
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20003
diff changeset
32 # if __GNUC__ >= 4
3a5f152e7ed0 This fixes compilation issues where old glib and either an old gcc or a
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20003
diff changeset
33 # define G_GNUC_NULL_TERMINATED __attribute__((__sentinel__))
3a5f152e7ed0 This fixes compilation issues where old glib and either an old gcc or a
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20003
diff changeset
34 # else
3a5f152e7ed0 This fixes compilation issues where old glib and either an old gcc or a
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20003
diff changeset
35 # define G_GNUC_NULL_TERMINATED
3a5f152e7ed0 This fixes compilation issues where old glib and either an old gcc or a
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20003
diff changeset
36 # endif
3a5f152e7ed0 This fixes compilation issues where old glib and either an old gcc or a
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20003
diff changeset
37 #endif
3a5f152e7ed0 This fixes compilation issues where old glib and either an old gcc or a
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20003
diff changeset
38
19913
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
39 /* This is the required definition of PURPLE_PLUGINS as required for a plugin,
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
40 * but we protect it with an #ifndef because config.h may define it for us
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
41 * already and this would cause an unneeded compiler warning. */
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
42 #ifndef PURPLE_PLUGINS
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
43 # define PURPLE_PLUGINS
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
44 #endif
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
45
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
46 #define PLUGIN_ID "core-notifyexample"
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
47 #define PLUGIN_AUTHOR "John Bailey <rekkanoryo@cpw.pidgin.im>"
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
48
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
49 #include <notify.h>
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
50 #include <plugin.h>
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
51 #include <version.h>
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
52
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
53 static PurplePlugin *notify_example = NULL;
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
54
20003
26f562916f98 Comment tweaks to be closer to the version handed out via the wiki as well as
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19913
diff changeset
55 /* The next four functions and the calls within them should cause dialog boxes to appear
26f562916f98 Comment tweaks to be closer to the version handed out via the wiki as well as
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19913
diff changeset
56 * when you select the plugin action from the Tools->Notify Example menu */
19913
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
57 static void
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
58 notify_error_cb(PurplePluginAction *action)
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
59 {
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
60 purple_notify_error(notify_example, "Test Notification", "Test Notification",
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
61 "This is a test error notification");
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
62 }
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
63
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
64 static void
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
65 notify_info_cb(PurplePluginAction *action)
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
66 {
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
67 purple_notify_info(notify_example, "Test Notification", "Test Notification",
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
68 "This is a test informative notification");
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
69 }
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
70
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
71 static void
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
72 notify_warn_cb(PurplePluginAction *action)
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
73 {
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
74 purple_notify_warning(notify_example, "Test Notification", "Test Notification",
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
75 "This is a test warning notification");
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
76 }
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
77
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
78 static void
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
79 notify_format_cb(PurplePluginAction *action)
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
80 {
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
81 purple_notify_formatted(notify_example, "Test Notification", "Test Notification",
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
82 "Test Notification",
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
83 "<I>This is a test notification with formatted text.</I>", NULL, NULL);
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
84 }
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
85
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
86 static void
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
87 notify_uri_cb(PurplePluginAction *action)
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
88 {
20003
26f562916f98 Comment tweaks to be closer to the version handed out via the wiki as well as
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19913
diff changeset
89 /* This one should open your web browser of choice. */
19913
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
90 purple_notify_uri(notify_example, "http://www.pidgin.im/");
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
91 }
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
92
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
93 static GList *
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
94 plugin_actions(PurplePlugin *plugin, gpointer context)
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
95 {
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
96 GList *actions = NULL;
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
97
20003
26f562916f98 Comment tweaks to be closer to the version handed out via the wiki as well as
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19913
diff changeset
98 /* Here we take advantage of return values to avoid the need for a temp variable */
19913
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
99 actions = g_list_prepend(actions,
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
100 purple_plugin_action_new("Show Error Notification", notify_error_cb));
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
101
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
102 actions = g_list_prepend(actions,
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
103 purple_plugin_action_new("Show Info Notification", notify_info_cb));
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
104
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
105 actions = g_list_prepend(actions,
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
106 purple_plugin_action_new("Show Warning Notification", notify_warn_cb));
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
107
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
108 actions = g_list_prepend(actions,
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
109 purple_plugin_action_new("Show Formatted Notification", notify_format_cb));
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
110
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
111 actions = g_list_prepend(actions,
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
112 purple_plugin_action_new("Show URI Notification", notify_uri_cb));
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
113
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
114 return g_list_reverse(actions);
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
115 }
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
116
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
117 static gboolean
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
118 plugin_load(PurplePlugin *plugin)
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
119 {
20003
26f562916f98 Comment tweaks to be closer to the version handed out via the wiki as well as
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19913
diff changeset
120 /* we need a handle for all the notify calls */
19913
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
121 notify_example = plugin;
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
122
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
123 return TRUE;
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
124 }
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
125
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
126 static PurplePluginInfo info = {
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
127 PURPLE_PLUGIN_MAGIC, /* magic number */
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
128 PURPLE_MAJOR_VERSION, /* purple major */
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
129 PURPLE_MINOR_VERSION, /* purple minor */
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
130 PURPLE_PLUGIN_STANDARD, /* plugin type */
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
131 NULL, /* UI requirement */
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
132 0, /* flags */
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
133 NULL, /* dependencies */
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
134 PURPLE_PRIORITY_DEFAULT, /* priority */
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
135
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
136 PLUGIN_ID, /* id */
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
137 "Notify API Example", /* name */
21030
3cc856ca2338 Add a --with-extraversion option to ./configure so packagers can fine tune
Stu Tomlinson <stu@nosnilmot.com>
parents: 20101
diff changeset
138 DISPLAY_VERSION, /* version */
19913
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
139 "Notify API Example", /* summary */
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
140 "Notify API Example", /* description */
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
141 PLUGIN_AUTHOR, /* author */
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
142 "http://pidgin.im", /* homepage */
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
143
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
144 plugin_load, /* load */
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
145 NULL, /* unload */
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
146 NULL, /* destroy */
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
147
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
148 NULL, /* ui info */
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
149 NULL, /* extra info */
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
150 NULL, /* prefs info */
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
151 plugin_actions, /* actions */
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
152 NULL, /* reserved */
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
153 NULL, /* reserved */
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
154 NULL, /* reserved */
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
155 NULL /* reserved */
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
156 };
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
157
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
158 static void
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
159 init_plugin(PurplePlugin *plugin)
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
160 {
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
161 }
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
162
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
163 PURPLE_INIT_PLUGIN(notifyexample, init_plugin, info)
2c69ceca8067 Adding a notify API example plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
164