Mercurial > pidgin
annotate libpurple/plugins/helloworld.c @ 25203:c5c4faef04ff
Patch from darkrain42
Introduce a temporary variable to aid in readability
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Tue, 18 Nov 2008 20:22:57 +0000 |
parents | 3cc856ca2338 |
children |
rev | line source |
---|---|
19951
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
1 /* |
19952
9500ab76c8dc
Fix the top of the header and also correct for the new FSF address.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19951
diff
changeset
|
2 * Hello World Plugin |
19951
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
3 * |
19952
9500ab76c8dc
Fix the top of the header and also correct for the new FSF address.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19951
diff
changeset
|
4 * Copyright (C) 2004, Gary Kramlich <grim@guifications.org>, |
19956
bdffee131b80
Fix my e-mail address to match my MTN key since it now is a real e-mail address.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19952
diff
changeset
|
5 * 2007, John Bailey <rekkanoryo@cpw.pidgin.im> |
19951
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
6 * |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
7 * This program is free software; you can redistribute it and/or |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
8 * modify it under the terms of the GNU General Public License as |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
9 * published by the Free Software Foundation; either version 2 of the |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
10 * License, or (at your option) any later version. |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
11 * |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, but |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
13 * WITHOUT ANY WARRANTY; without even the implied warranty of |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
15 * General Public License for more details. |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
16 * |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
17 * You should have received a copy of the GNU General Public License |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
18 * along with this program; if not, write to the Free Software |
19952
9500ab76c8dc
Fix the top of the header and also correct for the new FSF address.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19951
diff
changeset
|
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
9500ab76c8dc
Fix the top of the header and also correct for the new FSF address.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19951
diff
changeset
|
20 * 02111-1301, USA. |
9500ab76c8dc
Fix the top of the header and also correct for the new FSF address.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19951
diff
changeset
|
21 * |
19951
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
22 */ |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
23 |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
24 #ifdef HAVE_CONFIG_H |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
25 # include <config.h> |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
26 #endif |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
27 |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
28 /* config.h may define PURPLE_PLUGINS; protect the definition here so that we |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
29 * don't get complaints about redefinition when it's not necessary. */ |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
30 #ifndef PURPLE_PLUGINS |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
31 # define PURPLE_PLUGINS |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
32 #endif |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
33 |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
34 #include <glib.h> |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
35 |
20101
3a5f152e7ed0
This fixes compilation issues where old glib and either an old gcc or a
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19956
diff
changeset
|
36 /* 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:
19956
diff
changeset
|
37 * 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:
19956
diff
changeset
|
38 #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:
19956
diff
changeset
|
39 # if __GNUC__ >= 4 |
3a5f152e7ed0
This fixes compilation issues where old glib and either an old gcc or a
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19956
diff
changeset
|
40 # 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:
19956
diff
changeset
|
41 # else |
3a5f152e7ed0
This fixes compilation issues where old glib and either an old gcc or a
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19956
diff
changeset
|
42 # 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:
19956
diff
changeset
|
43 # endif |
3a5f152e7ed0
This fixes compilation issues where old glib and either an old gcc or a
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19956
diff
changeset
|
44 #endif |
3a5f152e7ed0
This fixes compilation issues where old glib and either an old gcc or a
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19956
diff
changeset
|
45 |
19951
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
46 #include <notify.h> |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
47 #include <plugin.h> |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
48 #include <version.h> |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
49 |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
50 /* we're adding this here and assigning it in plugin_load because we need |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
51 * a valid plugin handle for our call to purple_notify_message() in the |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
52 * plugin_action_test_cb() callback function */ |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
53 PurplePlugin *helloworld_plugin = NULL; |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
54 |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
55 /* This function is the callback for the plugin action we added. All we're |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
56 * doing here is displaying a message. When the user selects the plugin |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
57 * action, this function is called. */ |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
58 static void |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
59 plugin_action_test_cb (PurplePluginAction * action) |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
60 { |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
61 purple_notify_message (helloworld_plugin, PURPLE_NOTIFY_MSG_INFO, |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
62 "Plugin Actions Test", "This is a plugin actions test :)", NULL, NULL, |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
63 NULL); |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
64 } |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
65 |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
66 /* we tell libpurple in the PurplePluginInfo struct to call this function to |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
67 * get a list of plugin actions to use for the plugin. This function gives |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
68 * libpurple that list of actions. */ |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
69 static GList * |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
70 plugin_actions (PurplePlugin * plugin, gpointer context) |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
71 { |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
72 /* some C89 (a.k.a. ANSI C) compilers will warn if any variable declaration |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
73 * includes an initilization that calls a function. To avoid that, we |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
74 * generally initialize our variables first with constant values like NULL |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
75 * or 0 and assign to them with function calls later */ |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
76 GList *list = NULL; |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
77 PurplePluginAction *action = NULL; |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
78 |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
79 /* The action gets created by specifying a name to show in the UI and a |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
80 * callback function to call. */ |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
81 action = purple_plugin_action_new ("Plugin Action Test", plugin_action_test_cb); |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
82 |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
83 /* libpurple requires a GList of plugin actions, even if there is only one |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
84 * action in the list. We append the action to a GList here. */ |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
85 list = g_list_append (list, action); |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
86 |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
87 /* Once the list is complete, we send it to libpurple. */ |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
88 return list; |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
89 } |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
90 |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
91 static gboolean |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
92 plugin_load (PurplePlugin * plugin) |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
93 { |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
94 purple_notify_message (plugin, PURPLE_NOTIFY_MSG_INFO, "Hello World!", |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
95 "This is the Hello World! plugin :)", NULL, NULL, |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
96 NULL); |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
97 |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
98 helloworld_plugin = plugin; /* assign this here so we have a valid handle later */ |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
99 |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
100 return TRUE; |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
101 } |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
102 |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
103 /* For specific notes on the meanings of each of these members, consult the C Plugin Howto |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
104 * on the website. */ |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
105 static PurplePluginInfo info = { |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
106 PURPLE_PLUGIN_MAGIC, |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
107 PURPLE_MAJOR_VERSION, |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
108 PURPLE_MINOR_VERSION, |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
109 PURPLE_PLUGIN_STANDARD, |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
110 NULL, |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
111 0, |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
112 NULL, |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
113 PURPLE_PRIORITY_DEFAULT, |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
114 |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
115 "core-hello_world", |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
116 "Hello World!", |
21030
3cc856ca2338
Add a --with-extraversion option to ./configure so packagers can fine tune
Stu Tomlinson <stu@nosnilmot.com>
parents:
20101
diff
changeset
|
117 DISPLAY_VERSION, /* This constant is defined in config.h, but you shouldn't use it for |
3cc856ca2338
Add a --with-extraversion option to ./configure so packagers can fine tune
Stu Tomlinson <stu@nosnilmot.com>
parents:
20101
diff
changeset
|
118 your own plugins. We use it here because it's our plugin. And we're lazy. */ |
19951
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
119 |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
120 "Hello World Plugin", |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
121 "Hello World Plugin", |
19956
bdffee131b80
Fix my e-mail address to match my MTN key since it now is a real e-mail address.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19952
diff
changeset
|
122 "John Bailey <rekkanoryo@cpw.pidgin.im>", /* correct author */ |
19951
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
123 "http://helloworld.tld", |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
124 |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
125 |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
126 plugin_load, |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
127 NULL, |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
128 NULL, |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
129 |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
130 NULL, |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
131 NULL, |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
132 NULL, |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
133 plugin_actions, /* this tells libpurple the address of the function to call |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
134 to get the list of plugin actions. */ |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
135 NULL, |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
136 NULL, |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
137 NULL, |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
138 NULL |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
139 }; |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
140 |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
141 static void |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
142 init_plugin (PurplePlugin * plugin) |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
143 { |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
144 } |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
145 |
26c73c337d8f
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
146 PURPLE_INIT_PLUGIN (hello_world, init_plugin, info) |