Sat, 08 Sep 2007 22:03:20 +0000
Fix my e-mail address to match my MTN key since it now is a real e-mail address.
|
19873
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
1 | /* |
|
19874
5cf8fc23a5db
Fix the top of the header and also correct for the new FSF address.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19873
diff
changeset
|
2 | * Hello World Plugin |
|
19873
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
3 | * |
|
19874
5cf8fc23a5db
Fix the top of the header and also correct for the new FSF address.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19873
diff
changeset
|
4 | * Copyright (C) 2004, Gary Kramlich <grim@guifications.org>, |
|
19878
aa9d2cfa70bf
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:
19874
diff
changeset
|
5 | * 2007, John Bailey <rekkanoryo@cpw.pidgin.im> |
|
19873
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
6 | * |
|
84d19abe0d67
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 |
|
84d19abe0d67
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 |
|
84d19abe0d67
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 |
|
84d19abe0d67
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. |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
11 | * |
|
84d19abe0d67
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 |
|
84d19abe0d67
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 |
|
84d19abe0d67
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 |
|
84d19abe0d67
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. |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
16 | * |
|
84d19abe0d67
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 |
|
84d19abe0d67
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 |
|
19874
5cf8fc23a5db
Fix the top of the header and also correct for the new FSF address.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19873
diff
changeset
|
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
5cf8fc23a5db
Fix the top of the header and also correct for the new FSF address.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19873
diff
changeset
|
20 | * 02111-1301, USA. |
|
5cf8fc23a5db
Fix the top of the header and also correct for the new FSF address.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19873
diff
changeset
|
21 | * |
|
19873
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
22 | */ |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
23 | |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
24 | #ifdef HAVE_CONFIG_H |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
25 | # include <config.h> |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
26 | #endif |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
27 | |
|
84d19abe0d67
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 |
|
84d19abe0d67
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. */ |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
30 | #ifndef PURPLE_PLUGINS |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
31 | # define PURPLE_PLUGINS |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
32 | #endif |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
33 | |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
34 | #include <glib.h> |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
35 | |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
36 | #include <notify.h> |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
37 | #include <plugin.h> |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
38 | #include <version.h> |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
39 | |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
40 | /* we're adding this here and assigning it in plugin_load because we need |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
41 | * a valid plugin handle for our call to purple_notify_message() in the |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
42 | * plugin_action_test_cb() callback function */ |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
43 | PurplePlugin *helloworld_plugin = NULL; |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
44 | |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
45 | /* This function is the callback for the plugin action we added. All we're |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
46 | * doing here is displaying a message. When the user selects the plugin |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
47 | * action, this function is called. */ |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
48 | static void |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
49 | plugin_action_test_cb (PurplePluginAction * action) |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
50 | { |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
51 | purple_notify_message (helloworld_plugin, PURPLE_NOTIFY_MSG_INFO, |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
52 | "Plugin Actions Test", "This is a plugin actions test :)", NULL, NULL, |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
53 | NULL); |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
54 | } |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
55 | |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
56 | /* we tell libpurple in the PurplePluginInfo struct to call this function to |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
57 | * get a list of plugin actions to use for the plugin. This function gives |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
58 | * libpurple that list of actions. */ |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
59 | static GList * |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
60 | plugin_actions (PurplePlugin * plugin, gpointer context) |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
61 | { |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
62 | /* some C89 (a.k.a. ANSI C) compilers will warn if any variable declaration |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
63 | * includes an initilization that calls a function. To avoid that, we |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
64 | * generally initialize our variables first with constant values like NULL |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
65 | * or 0 and assign to them with function calls later */ |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
66 | GList *list = NULL; |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
67 | PurplePluginAction *action = NULL; |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
68 | |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
69 | /* The action gets created by specifying a name to show in the UI and a |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
70 | * callback function to call. */ |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
71 | action = purple_plugin_action_new ("Plugin Action Test", plugin_action_test_cb); |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
72 | |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
73 | /* libpurple requires a GList of plugin actions, even if there is only one |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
74 | * action in the list. We append the action to a GList here. */ |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
75 | list = g_list_append (list, action); |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
76 | |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
77 | /* Once the list is complete, we send it to libpurple. */ |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
78 | return list; |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
79 | } |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
80 | |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
81 | static gboolean |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
82 | plugin_load (PurplePlugin * plugin) |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
83 | { |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
84 | purple_notify_message (plugin, PURPLE_NOTIFY_MSG_INFO, "Hello World!", |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
85 | "This is the Hello World! plugin :)", NULL, NULL, |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
86 | NULL); |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
87 | |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
88 | helloworld_plugin = plugin; /* assign this here so we have a valid handle later */ |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
89 | |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
90 | return TRUE; |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
91 | } |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
92 | |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
93 | /* For specific notes on the meanings of each of these members, consult the C Plugin Howto |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
94 | * on the website. */ |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
95 | static PurplePluginInfo info = { |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
96 | PURPLE_PLUGIN_MAGIC, |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
97 | PURPLE_MAJOR_VERSION, |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
98 | PURPLE_MINOR_VERSION, |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
99 | PURPLE_PLUGIN_STANDARD, |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
100 | NULL, |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
101 | 0, |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
102 | NULL, |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
103 | PURPLE_PRIORITY_DEFAULT, |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
104 | |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
105 | "core-hello_world", |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
106 | "Hello World!", |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
107 | VERSION, /* This constant is defined in version.h, but you shouldn't use it for |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
108 | your own plugins. We use it here because it's our plugin. */ |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
109 | |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
110 | "Hello World Plugin", |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
111 | "Hello World Plugin", |
|
19878
aa9d2cfa70bf
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:
19874
diff
changeset
|
112 | "John Bailey <rekkanoryo@cpw.pidgin.im>", /* correct author */ |
|
19873
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
113 | "http://helloworld.tld", |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
114 | |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
115 | |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
116 | plugin_load, |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
117 | NULL, |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
118 | NULL, |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
119 | |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
120 | NULL, |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
121 | NULL, |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
122 | NULL, |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
123 | plugin_actions, /* this tells libpurple the address of the function to call |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
124 | to get the list of plugin actions. */ |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
125 | NULL, |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
126 | NULL, |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
127 | NULL, |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
128 | NULL |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
129 | }; |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
130 | |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
131 | static void |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
132 | init_plugin (PurplePlugin * plugin) |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
133 | { |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
134 | } |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
135 | |
|
84d19abe0d67
Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
136 | PURPLE_INIT_PLUGIN (hello_world, init_plugin, info) |