libpurple/plugins/helloworld.c

Sun, 22 Sep 2013 19:42:56 +0530

author
Ankit Vani <a@nevitus.org>
date
Sun, 22 Sep 2013 19:42:56 +0530
branch
soc.2013.gobjectification.plugins
changeset 36794
ab220f8db631
parent 36790
224906e4600c
child 36801
70047858a8fd
permissions
-rw-r--r--

Removed version.h from helloworld plugin. plugins.h already includes it.

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
20084
7b3c24de3714 applied changes from f4700a52b60d8473e9671ceabfec7772211fe424
Richard Laager <rlaager@pidgin.im>
parents: 19878
diff changeset
36 /* This will prevent compiler errors in some instances and is better explained in the
7b3c24de3714 applied changes from f4700a52b60d8473e9671ceabfec7772211fe424
Richard Laager <rlaager@pidgin.im>
parents: 19878
diff changeset
37 * how-to documents on the wiki */
7b3c24de3714 applied changes from f4700a52b60d8473e9671ceabfec7772211fe424
Richard Laager <rlaager@pidgin.im>
parents: 19878
diff changeset
38 #ifndef G_GNUC_NULL_TERMINATED
7b3c24de3714 applied changes from f4700a52b60d8473e9671ceabfec7772211fe424
Richard Laager <rlaager@pidgin.im>
parents: 19878
diff changeset
39 # if __GNUC__ >= 4
7b3c24de3714 applied changes from f4700a52b60d8473e9671ceabfec7772211fe424
Richard Laager <rlaager@pidgin.im>
parents: 19878
diff changeset
40 # define G_GNUC_NULL_TERMINATED __attribute__((__sentinel__))
7b3c24de3714 applied changes from f4700a52b60d8473e9671ceabfec7772211fe424
Richard Laager <rlaager@pidgin.im>
parents: 19878
diff changeset
41 # else
7b3c24de3714 applied changes from f4700a52b60d8473e9671ceabfec7772211fe424
Richard Laager <rlaager@pidgin.im>
parents: 19878
diff changeset
42 # define G_GNUC_NULL_TERMINATED
7b3c24de3714 applied changes from f4700a52b60d8473e9671ceabfec7772211fe424
Richard Laager <rlaager@pidgin.im>
parents: 19878
diff changeset
43 # endif
7b3c24de3714 applied changes from f4700a52b60d8473e9671ceabfec7772211fe424
Richard Laager <rlaager@pidgin.im>
parents: 19878
diff changeset
44 #endif
7b3c24de3714 applied changes from f4700a52b60d8473e9671ceabfec7772211fe424
Richard Laager <rlaager@pidgin.im>
parents: 19878
diff changeset
45
19873
84d19abe0d67 Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
46 #include <notify.h>
36367
891eea799578 Renamed plugin.[ch] to plugins.[ch], since we (will) no longer have a PurplePlugin structure.
Ankit Vani <a@nevitus.org>
parents: 20288
diff changeset
47 #include <plugins.h>
19873
84d19abe0d67 Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
48
84d19abe0d67 Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
49 /* 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
50 * 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
51 * 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
52 static void
84d19abe0d67 Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
53 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
54 {
36790
224906e4600c removed unnecessary global variable from helloworld plugin
Ankit Vani <a@nevitus.org>
parents: 36782
diff changeset
55 purple_notify_message (action->plugin, PURPLE_NOTIFY_MSG_INFO,
19873
84d19abe0d67 Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
56 "Plugin Actions Test", "This is a plugin actions test :)", NULL, NULL,
34449
bbcb198650b7 Notify API: extend purple_notify_message with PurpleRequestCommonParameters
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 20288
diff changeset
57 NULL, NULL);
19873
84d19abe0d67 Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
58 }
84d19abe0d67 Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
59
84d19abe0d67 Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
60 /* 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
61 * 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
62 * 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
63 static GList *
36742
5d43951cabc0 More refactoring
Ankit Vani <a@nevitus.org>
parents: 36740
diff changeset
64 plugin_actions (PurplePlugin * plugin)
19873
84d19abe0d67 Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
65 {
84d19abe0d67 Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
66 /* 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
67 * 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
68 * 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
69 * 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
70 GList *list = NULL;
84d19abe0d67 Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
71 PurplePluginAction *action = NULL;
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 /* 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
74 * callback function to call. */
84d19abe0d67 Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
75 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
76
84d19abe0d67 Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
77 /* 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
78 * 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
79 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
80
84d19abe0d67 Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
81 /* 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
82 return list;
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
36740
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
85 static PurplePluginInfo *
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
86 plugin_query (GError ** error)
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
87 {
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
88 const gchar * const authors[] = {
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
89 "John Bailey <rekkanoryo@cpw.pidgin.im>", /* correct author */
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
90 NULL
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
91 };
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
92
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
93 /* For specific notes on the meanings of each of these members, consult the
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
94 C Plugin Howto on the website. */
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
95 return purple_plugin_info_new (
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
96 "id", "core-hello_world",
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
97 "name", "Hello World!",
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
98 "version", DISPLAY_VERSION, /* This constant is defined in config.h, but you shouldn't use it for your
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
99 own plugins. We use it here because it's our plugin. And we're lazy. */
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
100 "category", "Example",
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
101 "summary", "Hello World Plugin",
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
102 "description", "Hello World Plugin",
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
103 "authors", authors,
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
104 "website", "http://helloworld.tld",
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
105 "abi-version", PURPLE_ABI_VERSION,
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
106 "get-actions", plugin_actions, /* this tells libpurple the address of the function to call to get the list
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
107 of plugin actions. */
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
108 NULL
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
109 );
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
110 }
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
111
19873
84d19abe0d67 Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
112 static gboolean
36740
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
113 plugin_load (PurplePlugin * plugin, GError ** error)
19873
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 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
116 "This is the Hello World! plugin :)", NULL, NULL,
34449
bbcb198650b7 Notify API: extend purple_notify_message with PurpleRequestCommonParameters
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 20288
diff changeset
117 NULL, NULL);
19873
84d19abe0d67 Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
118
84d19abe0d67 Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
119 return TRUE;
84d19abe0d67 Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
120 }
84d19abe0d67 Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
121
36740
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
122 static gboolean
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
123 plugin_unload (PurplePlugin * plugin, GError ** error)
19873
84d19abe0d67 Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
124 {
36740
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
125 return TRUE;
19873
84d19abe0d67 Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
126 }
84d19abe0d67 Adding the helloworld.c plugin used in the BasicPluginHowto and the
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
127
36740
569f0d81876a Refactored the helloworld plugin to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 36367
diff changeset
128 PURPLE_PLUGIN_INIT (hello_world, plugin_query, plugin_load, plugin_unload);

mercurial