Mercurial > pidgin
annotate libpurple/core.h @ 24308:00420530cc56
escape nick change message
author | Ka-Hing Cheung <khc@hxbc.us> |
---|---|
date | Sun, 26 Oct 2008 21:21:14 +0000 |
parents | c6b29adc22d1 |
children | 1d3274111180 584063555949 |
rev | line source |
---|---|
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1 /** |
23369
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
2 * @file core.h Startup and shutdown of libpurple |
16195
7517e6289bc9
Relabel the Doxygen group as libpurple
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
3 * @defgroup core libpurple |
20799
f296be2a1039
All the links to libpurple signal pages were in the comment containing the
Will Thompson <will.thompson@collabora.co.uk>
parents:
20074
diff
changeset
|
4 * @see @ref core-signals |
20074
6bf32c9e15a7
remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents:
19681
diff
changeset
|
5 */ |
6bf32c9e15a7
remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents:
19681
diff
changeset
|
6 |
6bf32c9e15a7
remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents:
19681
diff
changeset
|
7 /* purple |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
8 * |
15822 | 9 * Purple is the legal property of its developers, whose names are too numerous |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
10 * to list here. Please refer to the COPYRIGHT file distributed with this |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
11 * source distribution. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
12 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
13 * This program is free software; you can redistribute it and/or modify |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
14 * it under the terms of the GNU General Public License as published by |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
15 * the Free Software Foundation; either version 2 of the License, or |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
16 * (at your option) any later version. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
17 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
18 * This program is distributed in the hope that it will be useful, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
21 * GNU General Public License for more details. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
22 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
23 * You should have received a copy of the GNU General Public License |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
24 * along with this program; if not, write to the Free Software |
19681
44b4e8bd759b
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
18456
diff
changeset
|
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
26 */ |
15822 | 27 #ifndef _PURPLE_CORE_H_ |
28 #define _PURPLE_CORE_H_ | |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
29 |
15822 | 30 typedef struct PurpleCore PurpleCore; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
31 |
23369
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
32 /** Callbacks that fire at different points of the initialization and teardown |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
33 * of libpurple, along with a hook to return descriptive information about the |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
34 * UI. |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
35 */ |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
36 typedef struct |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
37 { |
23369
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
38 /** Called just after the preferences subsystem is initialized; the UI |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
39 * could use this callback to add some preferences it needs to be in |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
40 * place when other subsystems are initialized. |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
41 */ |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
42 void (*ui_prefs_init)(void); |
23369
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
43 /** Called just after the debug subsystem is initialized, but before |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
44 * just about every other component's initialization. The UI should |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
45 * use this hook to call purple_debug_set_ui_ops() so that debugging |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
46 * information for other components can be logged during their |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
47 * initialization. |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
48 */ |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
49 void (*debug_ui_init)(void); |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
50 /** Called after all of libpurple has been initialized. The UI should |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
51 * use this hook to set all other necessary UiOps structures. |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
52 * |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
53 * @see @ref ui-ops |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
54 */ |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
55 void (*ui_init)(void); |
23369
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
56 /** Called after most of libpurple has been uninitialized. */ |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
57 void (*quit)(void); |
23369
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
58 |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
59 /** Called by purple_core_get_ui_info(); should return the information |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
60 * documented there. |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
61 */ |
18292
9db52d9b8436
core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents:
17730
diff
changeset
|
62 GHashTable* (*get_ui_info)(void); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
63 |
16664
516f14bef90e
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
16341
diff
changeset
|
64 void (*_purple_reserved1)(void); |
516f14bef90e
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
16341
diff
changeset
|
65 void (*_purple_reserved2)(void); |
516f14bef90e
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
16341
diff
changeset
|
66 void (*_purple_reserved3)(void); |
15822 | 67 } PurpleCoreUiOps; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
68 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
69 #ifdef __cplusplus |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
70 extern "C" { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
71 #endif |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
72 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
73 /** |
15822 | 74 * Initializes the core of purple. |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
75 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
76 * This will setup preferences for all the core subsystems. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
77 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
78 * @param ui The ID of the UI using the core. This should be a |
15822 | 79 * unique ID, registered with the purple team. |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
80 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
81 * @return @c TRUE if successful, or @c FALSE otherwise. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
82 */ |
15822 | 83 gboolean purple_core_init(const char *ui); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
84 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
85 /** |
15822 | 86 * Quits the core of purple, which, depending on the UI, may quit the |
87 * application using the purple core. | |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
88 */ |
15822 | 89 void purple_core_quit(void); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
90 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
91 /** |
23369
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
92 * <p> |
15822 | 93 * Calls purple_core_quit(). This can be used as the function |
94 * passed to purple_timeout_add() when you want to shutdown Purple | |
95 * in a specified amount of time. When shutting down Purple | |
22010
7e5ecf03b69d
Clarify a comment that was confusing me. Thanks resiak!
Richard Laager <rlaager@wiktel.com>
parents:
20799
diff
changeset
|
96 * from a plugin, you must use this instead of purple_core_quit(); |
7e5ecf03b69d
Clarify a comment that was confusing me. Thanks resiak!
Richard Laager <rlaager@wiktel.com>
parents:
20799
diff
changeset
|
97 * for an immediate exit, use a timeout value of 0: |
23369
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
98 * </p> |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
99 * |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
100 * <code>purple_timeout_add(0, purple_core_quitcb, NULL);</code> |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
101 * |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
102 * <p> |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
103 * This is ensures that code from your plugin is not being |
22010
7e5ecf03b69d
Clarify a comment that was confusing me. Thanks resiak!
Richard Laager <rlaager@wiktel.com>
parents:
20799
diff
changeset
|
104 * executed when purple_core_quit() is called. If the plugin |
7e5ecf03b69d
Clarify a comment that was confusing me. Thanks resiak!
Richard Laager <rlaager@wiktel.com>
parents:
20799
diff
changeset
|
105 * called purple_core_quit() directly, you would get a core dump |
7e5ecf03b69d
Clarify a comment that was confusing me. Thanks resiak!
Richard Laager <rlaager@wiktel.com>
parents:
20799
diff
changeset
|
106 * after purple_core_quit() executes and control returns to your |
7e5ecf03b69d
Clarify a comment that was confusing me. Thanks resiak!
Richard Laager <rlaager@wiktel.com>
parents:
20799
diff
changeset
|
107 * plugin because purple_core_quit() frees all plugins. |
23369
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
108 * </p> |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
109 */ |
15822 | 110 gboolean purple_core_quit_cb(gpointer unused); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
111 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
112 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
113 * Returns the version of the core library. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
114 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
115 * @return The version of the core library. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
116 */ |
15822 | 117 const char *purple_core_get_version(void); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
118 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
119 /** |
23369
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
120 * Returns the ID of the UI that is using the core, as passed to |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
121 * purple_core_init(). |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
122 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
123 * @return The ID of the UI that is currently using the core. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
124 */ |
15822 | 125 const char *purple_core_get_ui(void); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
126 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
127 /** |
15822 | 128 * Returns a handle to the purple core. |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
129 * |
23369
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
130 * This is used to connect to @ref core-signals "core signals". |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
131 */ |
15822 | 132 PurpleCore *purple_get_core(void); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
133 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
134 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
135 * Sets the UI ops for the core. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
136 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
137 * @param ops A UI ops structure for the core. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
138 */ |
15822 | 139 void purple_core_set_ui_ops(PurpleCoreUiOps *ops); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
140 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
141 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
142 * Returns the UI ops for the core. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
143 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
144 * @return The core's UI ops structure. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
145 */ |
15822 | 146 PurpleCoreUiOps *purple_core_get_ui_ops(void); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
147 |
16341
786edf5e2144
The core portion of the migration code. This is implemented as I described
Richard Laager <rlaager@wiktel.com>
parents:
16195
diff
changeset
|
148 /** |
23369
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
149 * Migrates from <tt>.gaim</tt> to <tt>.purple</tt>. |
16341
786edf5e2144
The core portion of the migration code. This is implemented as I described
Richard Laager <rlaager@wiktel.com>
parents:
16195
diff
changeset
|
150 * |
23369
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
151 * UIs <strong>must not</strong> call this if they have been told to use a |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
152 * custom user directory. |
16341
786edf5e2144
The core portion of the migration code. This is implemented as I described
Richard Laager <rlaager@wiktel.com>
parents:
16195
diff
changeset
|
153 * |
786edf5e2144
The core portion of the migration code. This is implemented as I described
Richard Laager <rlaager@wiktel.com>
parents:
16195
diff
changeset
|
154 * @return A boolean indicating success or migration failure. On failure, |
786edf5e2144
The core portion of the migration code. This is implemented as I described
Richard Laager <rlaager@wiktel.com>
parents:
16195
diff
changeset
|
155 * the application must display an error to the user and then exit. |
786edf5e2144
The core portion of the migration code. This is implemented as I described
Richard Laager <rlaager@wiktel.com>
parents:
16195
diff
changeset
|
156 */ |
786edf5e2144
The core portion of the migration code. This is implemented as I described
Richard Laager <rlaager@wiktel.com>
parents:
16195
diff
changeset
|
157 gboolean purple_core_migrate(void); |
786edf5e2144
The core portion of the migration code. This is implemented as I described
Richard Laager <rlaager@wiktel.com>
parents:
16195
diff
changeset
|
158 |
17709
176d0fc8bc16
Alternative dbus_uniq implementation
Gabriel Schulhof <nix@go-nix.ca>
parents:
16664
diff
changeset
|
159 /** |
23369
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
160 * Ensures that only one instance is running. If libpurple is built with D-Bus |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
161 * support, this checks if another process owns the libpurple bus name and if |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
162 * so whether that process is using the same configuration directory as this |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
163 * process. |
17709
176d0fc8bc16
Alternative dbus_uniq implementation
Gabriel Schulhof <nix@go-nix.ca>
parents:
16664
diff
changeset
|
164 * |
23369
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
165 * @return @c TRUE if this is the first instance of libpurple running; |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
166 * @c FALSE if there is another instance running. |
17730
41ae5efe745c
Document the API changes.
Richard Laager <rlaager@wiktel.com>
parents:
17710
diff
changeset
|
167 * |
41ae5efe745c
Document the API changes.
Richard Laager <rlaager@wiktel.com>
parents:
17710
diff
changeset
|
168 * @since 2.1.0 |
17709
176d0fc8bc16
Alternative dbus_uniq implementation
Gabriel Schulhof <nix@go-nix.ca>
parents:
16664
diff
changeset
|
169 */ |
176d0fc8bc16
Alternative dbus_uniq implementation
Gabriel Schulhof <nix@go-nix.ca>
parents:
16664
diff
changeset
|
170 gboolean purple_core_ensure_single_instance(void); |
176d0fc8bc16
Alternative dbus_uniq implementation
Gabriel Schulhof <nix@go-nix.ca>
parents:
16664
diff
changeset
|
171 |
18292
9db52d9b8436
core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents:
17730
diff
changeset
|
172 /** |
23369
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
173 * Returns a hash table containing various information about the UI. The |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
174 * following well-known entries may be in the table (along with any others the |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
175 * UI might choose to include): |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
176 * |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
177 * <dl> |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
178 * <dt><tt>name</tt></dt> |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
179 * <dd>the user-readable name for the UI.</dd> |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
180 * |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
181 * <dt><tt>version</tt></dt> |
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
182 * <dd>a user-readable description of the current version of the UI.</dd> |
23402
c6b29adc22d1
Added "website" and "dev_website" items to the ui_info GHashTable,
Evan Schoenberg <evan.s@dreskin.net>
parents:
23369
diff
changeset
|
183 * |
c6b29adc22d1
Added "website" and "dev_website" items to the ui_info GHashTable,
Evan Schoenberg <evan.s@dreskin.net>
parents:
23369
diff
changeset
|
184 * <dt><tt>website</tt></dt> |
c6b29adc22d1
Added "website" and "dev_website" items to the ui_info GHashTable,
Evan Schoenberg <evan.s@dreskin.net>
parents:
23369
diff
changeset
|
185 * <dd>the UI's website, such as http://pidgin.im.</dd> |
c6b29adc22d1
Added "website" and "dev_website" items to the ui_info GHashTable,
Evan Schoenberg <evan.s@dreskin.net>
parents:
23369
diff
changeset
|
186 * |
c6b29adc22d1
Added "website" and "dev_website" items to the ui_info GHashTable,
Evan Schoenberg <evan.s@dreskin.net>
parents:
23369
diff
changeset
|
187 * <dt><tt>dev_website</tt></dt> |
c6b29adc22d1
Added "website" and "dev_website" items to the ui_info GHashTable,
Evan Schoenberg <evan.s@dreskin.net>
parents:
23369
diff
changeset
|
188 * <dd>the UI's development/support website, such as http://developer.pidgin.im.</dd> |
23369
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
189 * </dl> |
18292
9db52d9b8436
core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents:
17730
diff
changeset
|
190 * |
9db52d9b8436
core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents:
17730
diff
changeset
|
191 * @return A GHashTable with strings for keys and values. This |
23369
09697d94160f
Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <will.thompson@collabora.co.uk>
parents:
22010
diff
changeset
|
192 * hash table must not be freed and should not be modified. |
18292
9db52d9b8436
core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents:
17730
diff
changeset
|
193 * |
9db52d9b8436
core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents:
17730
diff
changeset
|
194 * @since 2.1.0 |
9db52d9b8436
core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents:
17730
diff
changeset
|
195 * |
9db52d9b8436
core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents:
17730
diff
changeset
|
196 */ |
9db52d9b8436
core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents:
17730
diff
changeset
|
197 GHashTable* purple_core_get_ui_info(void); |
9db52d9b8436
core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents:
17730
diff
changeset
|
198 |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
199 #ifdef __cplusplus |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
200 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
201 #endif |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
202 |
15822 | 203 #endif /* _PURPLE_CORE_H_ */ |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
204 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
205 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
206 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
207 /===- |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
208 `//"\\ """"`---.___.-"" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
209 ______-==| | | \\ _-"` |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
210 __--""" ,-/-==\\ | | `\ ,' |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
211 _-" /' | \\ ___ / / \ / |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
212 .' / | \\ /" "\ /' / \ /' |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
213 / ____ / | \`\.__/-"" D O \_/' / \/' |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
214 /-'" """""---__ | "-/" O G R /' _--"` |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
215 \_| / R __--_ t ), __--"" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
216 '""--_/ T _-"_>--<_\ h '-" \ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
217 {\__--_/} / \\__>--<__\ e B \ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
218 /' (_/ _-" | |__>--<__| U | |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
219 | _/) )-" | |__>--<__| R | |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
220 / /" ,_/ / /__>---<__/ N | |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
221 o-o _// /-"_>---<__-" I / |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
222 (^(" /"_>---<__- N _-" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
223 ,/| /__>--<__/ A _-" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
224 ,//('( |__>--<__| T / .----_ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
225 ( ( ')) |__>--<__| | /' _---_"\ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
226 `-)) )) ( |__>--<__| O | /' / "\`\ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
227 ,/,'//( ( \__>--<__\ R \ /' // || |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
228 ,( ( ((, )) "-__>--<_"-_ "--____---"' _/'/ /' |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
229 `"/ )` ) ,/| "-_">--<_/-__ __-" _/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
230 ._-"//( )/ )) ` ""-'_/_/ /"""""""__--" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
231 ;'( ')/ ,)( """""""""" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
232 ' ') '( (/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
233 ' ' ` |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
234 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
235 */ |