libpurple/core.h

Tue, 01 Jul 2008 23:40:13 +0000

author
Evan Schoenberg <evands@pidgin.im>
date
Tue, 01 Jul 2008 23:40:13 +0000
changeset 23545
676b13ddfd2c
parent 23511
650ebfc167ab
child 25577
ca0b40451bbc
child 25888
d0fdd378a635
permissions
-rw-r--r--

Added "website" and "dev_website" items to the ui_info GHashTable,
and made use of "website" wherever PURPLE_WEBSITE was found previously.

Thanks to Stu for the suggestion as a replacement for my #define-based
previous solution.

5034
077678f7b048 [gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents: 5032
diff changeset
1 /**
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
2 * @file core.h Startup and shutdown of libpurple
16256
8c912f6c4f43 Relabel the Doxygen group as libpurple
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
3 * @defgroup core libpurple
20889
3d0ef192f98c All the links to libpurple signal pages were in the comment containing the
Will Thompson <resiak@pidgin.im>
parents: 20147
diff changeset
4 * @see @ref core-signals
20147
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
5 */
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
6
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
7 /* purple
2417
7751d1269b09 [gaim-migrate @ 2430]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
8 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
9 * Purple is the legal property of its developers, whose names are too numerous
8046
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7646
diff changeset
10 * to list here. Please refer to the COPYRIGHT file distributed with this
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7646
diff changeset
11 * source distribution.
6612
aac6af649208 [gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents: 6314
diff changeset
12 *
2417
7751d1269b09 [gaim-migrate @ 2430]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
13 * This program is free software; you can redistribute it and/or modify
7751d1269b09 [gaim-migrate @ 2430]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
14 * it under the terms of the GNU General Public License as published by
7751d1269b09 [gaim-migrate @ 2430]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
15 * the Free Software Foundation; either version 2 of the License, or
7751d1269b09 [gaim-migrate @ 2430]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
16 * (at your option) any later version.
7751d1269b09 [gaim-migrate @ 2430]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
17 *
7751d1269b09 [gaim-migrate @ 2430]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
18 * This program is distributed in the hope that it will be useful,
7751d1269b09 [gaim-migrate @ 2430]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
7751d1269b09 [gaim-migrate @ 2430]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7751d1269b09 [gaim-migrate @ 2430]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
21 * GNU General Public License for more details.
7751d1269b09 [gaim-migrate @ 2430]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
22 *
7751d1269b09 [gaim-migrate @ 2430]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
23 * You should have received a copy of the GNU General Public License
7751d1269b09 [gaim-migrate @ 2430]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
24 * along with this program; if not, write to the Free Software
19859
71d37b57eff2 The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 18606
diff changeset
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
2417
7751d1269b09 [gaim-migrate @ 2430]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
26 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
27 #ifndef _PURPLE_CORE_H_
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
28 #define _PURPLE_CORE_H_
2417
7751d1269b09 [gaim-migrate @ 2430]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
29
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
30 typedef struct PurpleCore PurpleCore;
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
31
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
32 /** Callbacks that fire at different points of the initialization and teardown
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
33 * of libpurple, along with a hook to return descriptive information about the
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
34 * UI.
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
35 */
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
36 typedef struct
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
37 {
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
38 /** Called just after the preferences subsystem is initialized; the UI
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
39 * could use this callback to add some preferences it needs to be in
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
40 * place when other subsystems are initialized.
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
41 */
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
42 void (*ui_prefs_init)(void);
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
43 /** Called just after the debug subsystem is initialized, but before
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
44 * just about every other component's initialization. The UI should
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
45 * use this hook to call purple_debug_set_ui_ops() so that debugging
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
46 * information for other components can be logged during their
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
47 * initialization.
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
48 */
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
49 void (*debug_ui_init)(void);
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
50 /** Called after all of libpurple has been initialized. The UI should
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
51 * use this hook to set all other necessary UiOps structures.
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
52 *
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
53 * @see @ref ui-ops
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
54 */
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
55 void (*ui_init)(void);
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
56 /** Called after most of libpurple has been uninitialized. */
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
57 void (*quit)(void);
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
58
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
59 /** Called by purple_core_get_ui_info(); should return the information
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
60 * documented there.
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
61 */
18441
d255d04c0aa1 core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents: 18072
diff changeset
62 GHashTable* (*get_ui_info)(void);
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
63
16743
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 16409
diff changeset
64 void (*_purple_reserved1)(void);
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 16409
diff changeset
65 void (*_purple_reserved2)(void);
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 16409
diff changeset
66 void (*_purple_reserved3)(void);
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
67 } PurpleCoreUiOps;
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
68
6314
25bba03c42cd [gaim-migrate @ 6813]
Christian Hammond <chipx86@chipx86.com>
parents: 6182
diff changeset
69 #ifdef __cplusplus
25bba03c42cd [gaim-migrate @ 6813]
Christian Hammond <chipx86@chipx86.com>
parents: 6182
diff changeset
70 extern "C" {
25bba03c42cd [gaim-migrate @ 6813]
Christian Hammond <chipx86@chipx86.com>
parents: 6182
diff changeset
71 #endif
25bba03c42cd [gaim-migrate @ 6813]
Christian Hammond <chipx86@chipx86.com>
parents: 6182
diff changeset
72
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
73 /**
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
74 * Initializes the core of purple.
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
75 *
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
76 * This will setup preferences for all the core subsystems.
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
77 *
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
78 * @param ui The ID of the UI using the core. This should be a
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
79 * unique ID, registered with the purple team.
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
80 *
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
81 * @return @c TRUE if successful, or @c FALSE otherwise.
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
82 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
83 gboolean purple_core_init(const char *ui);
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
84
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
85 /**
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
86 * Quits the core of purple, which, depending on the UI, may quit the
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
87 * application using the purple core.
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
88 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
89 void purple_core_quit(void);
2417
7751d1269b09 [gaim-migrate @ 2430]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
90
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
91 /**
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
92 * <p>
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
93 * Calls purple_core_quit(). This can be used as the function
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
94 * passed to purple_timeout_add() when you want to shutdown Purple
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
95 * in a specified amount of time. When shutting down Purple
22107
776a0aa56a41 Clarify a comment that was confusing me. Thanks resiak!
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
96 * from a plugin, you must use this instead of purple_core_quit();
776a0aa56a41 Clarify a comment that was confusing me. Thanks resiak!
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
97 * for an immediate exit, use a timeout value of 0:
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
98 * </p>
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
99 *
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
100 * <code>purple_timeout_add(0, purple_core_quitcb, NULL);</code>
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
101 *
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
102 * <p>
7646
6806a6893ac0 [gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents: 7082
diff changeset
103 * This is ensures that code from your plugin is not being
22107
776a0aa56a41 Clarify a comment that was confusing me. Thanks resiak!
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
104 * executed when purple_core_quit() is called. If the plugin
776a0aa56a41 Clarify a comment that was confusing me. Thanks resiak!
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
105 * called purple_core_quit() directly, you would get a core dump
776a0aa56a41 Clarify a comment that was confusing me. Thanks resiak!
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
106 * after purple_core_quit() executes and control returns to your
776a0aa56a41 Clarify a comment that was confusing me. Thanks resiak!
Richard Laager <rlaager@pidgin.im>
parents: 20889
diff changeset
107 * plugin because purple_core_quit() frees all plugins.
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
108 * </p>
7646
6806a6893ac0 [gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents: 7082
diff changeset
109 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
110 gboolean purple_core_quit_cb(gpointer unused);
7646
6806a6893ac0 [gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents: 7082
diff changeset
111
6806a6893ac0 [gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents: 7082
diff changeset
112 /**
6612
aac6af649208 [gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents: 6314
diff changeset
113 * Returns the version of the core library.
aac6af649208 [gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents: 6314
diff changeset
114 *
aac6af649208 [gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents: 6314
diff changeset
115 * @return The version of the core library.
aac6af649208 [gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents: 6314
diff changeset
116 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
117 const char *purple_core_get_version(void);
6612
aac6af649208 [gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents: 6314
diff changeset
118
aac6af649208 [gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents: 6314
diff changeset
119 /**
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
120 * Returns the ID of the UI that is using the core, as passed to
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
121 * purple_core_init().
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
122 *
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
123 * @return The ID of the UI that is currently using the core.
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
124 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
125 const char *purple_core_get_ui(void);
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
126
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
127 /**
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
128 * Returns a handle to the purple core.
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
129 *
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
130 * This is used to connect to @ref core-signals "core signals".
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
131 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
132 PurpleCore *purple_get_core(void);
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
133
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
134 /**
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
135 * Sets the UI ops for the core.
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
136 *
12369
5635c1f02708 [gaim-migrate @ 14673]
Peter Lawler <pidgin@bleeter.id.au>
parents: 11035
diff changeset
137 * @param ops A UI ops structure for the core.
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
138 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
139 void purple_core_set_ui_ops(PurpleCoreUiOps *ops);
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
140
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
141 /**
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
142 * Returns the UI ops for the core.
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
143 *
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
144 * @return The core's UI ops structure.
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
145 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
146 PurpleCoreUiOps *purple_core_get_ui_ops(void);
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
147
16409
8c153c6febdd The core portion of the migration code. This is implemented as I described
Richard Laager <rlaager@pidgin.im>
parents: 16256
diff changeset
148 /**
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
149 * Migrates from <tt>.gaim</tt> to <tt>.purple</tt>.
16409
8c153c6febdd The core portion of the migration code. This is implemented as I described
Richard Laager <rlaager@pidgin.im>
parents: 16256
diff changeset
150 *
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
151 * UIs <strong>must not</strong> call this if they have been told to use a
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
152 * custom user directory.
16409
8c153c6febdd The core portion of the migration code. This is implemented as I described
Richard Laager <rlaager@pidgin.im>
parents: 16256
diff changeset
153 *
8c153c6febdd The core portion of the migration code. This is implemented as I described
Richard Laager <rlaager@pidgin.im>
parents: 16256
diff changeset
154 * @return A boolean indicating success or migration failure. On failure,
8c153c6febdd The core portion of the migration code. This is implemented as I described
Richard Laager <rlaager@pidgin.im>
parents: 16256
diff changeset
155 * the application must display an error to the user and then exit.
8c153c6febdd The core portion of the migration code. This is implemented as I described
Richard Laager <rlaager@pidgin.im>
parents: 16256
diff changeset
156 */
8c153c6febdd The core portion of the migration code. This is implemented as I described
Richard Laager <rlaager@pidgin.im>
parents: 16256
diff changeset
157 gboolean purple_core_migrate(void);
8c153c6febdd The core portion of the migration code. This is implemented as I described
Richard Laager <rlaager@pidgin.im>
parents: 16256
diff changeset
158
17121
43d41f5ce17b Alternative dbus_uniq implementation
Gabriel Schulhof <nix@go-nix.ca>
parents: 16743
diff changeset
159 /**
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
160 * Ensures that only one instance is running. If libpurple is built with D-Bus
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
161 * support, this checks if another process owns the libpurple bus name and if
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
162 * so whether that process is using the same configuration directory as this
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
163 * process.
17121
43d41f5ce17b Alternative dbus_uniq implementation
Gabriel Schulhof <nix@go-nix.ca>
parents: 16743
diff changeset
164 *
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
165 * @return @c TRUE if this is the first instance of libpurple running;
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
166 * @c FALSE if there is another instance running.
17883
85abd6e343df Document the API changes.
Richard Laager <rlaager@pidgin.im>
parents: 17122
diff changeset
167 *
85abd6e343df Document the API changes.
Richard Laager <rlaager@pidgin.im>
parents: 17122
diff changeset
168 * @since 2.1.0
17121
43d41f5ce17b Alternative dbus_uniq implementation
Gabriel Schulhof <nix@go-nix.ca>
parents: 16743
diff changeset
169 */
43d41f5ce17b Alternative dbus_uniq implementation
Gabriel Schulhof <nix@go-nix.ca>
parents: 16743
diff changeset
170 gboolean purple_core_ensure_single_instance(void);
43d41f5ce17b Alternative dbus_uniq implementation
Gabriel Schulhof <nix@go-nix.ca>
parents: 16743
diff changeset
171
18441
d255d04c0aa1 core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents: 18072
diff changeset
172 /**
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
173 * Returns a hash table containing various information about the UI. The
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
174 * following well-known entries may be in the table (along with any others the
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
175 * UI might choose to include):
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
176 *
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
177 * <dl>
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
178 * <dt><tt>name</tt></dt>
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
179 * <dd>the user-readable name for the UI.</dd>
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
180 *
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
181 * <dt><tt>version</tt></dt>
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
182 * <dd>a user-readable description of the current version of the UI.</dd>
23545
676b13ddfd2c Added "website" and "dev_website" items to the ui_info GHashTable,
Evan Schoenberg <evands@pidgin.im>
parents: 23511
diff changeset
183 *
676b13ddfd2c Added "website" and "dev_website" items to the ui_info GHashTable,
Evan Schoenberg <evands@pidgin.im>
parents: 23511
diff changeset
184 * <dt><tt>website</tt></dt>
676b13ddfd2c Added "website" and "dev_website" items to the ui_info GHashTable,
Evan Schoenberg <evands@pidgin.im>
parents: 23511
diff changeset
185 * <dd>the UI's website, such as http://pidgin.im.</dd>
676b13ddfd2c Added "website" and "dev_website" items to the ui_info GHashTable,
Evan Schoenberg <evands@pidgin.im>
parents: 23511
diff changeset
186 *
676b13ddfd2c Added "website" and "dev_website" items to the ui_info GHashTable,
Evan Schoenberg <evands@pidgin.im>
parents: 23511
diff changeset
187 * <dt><tt>dev_website</tt></dt>
676b13ddfd2c Added "website" and "dev_website" items to the ui_info GHashTable,
Evan Schoenberg <evands@pidgin.im>
parents: 23511
diff changeset
188 * <dd>the UI's development/support website, such as http://developer.pidgin.im.</dd>
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
189 * </dl>
18441
d255d04c0aa1 core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents: 18072
diff changeset
190 *
d255d04c0aa1 core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents: 18072
diff changeset
191 * @return A GHashTable with strings for keys and values. This
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
192 * hash table must not be freed and should not be modified.
18441
d255d04c0aa1 core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents: 18072
diff changeset
193 *
d255d04c0aa1 core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents: 18072
diff changeset
194 * @since 2.1.0
d255d04c0aa1 core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents: 18072
diff changeset
195 *
d255d04c0aa1 core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents: 18072
diff changeset
196 */
d255d04c0aa1 core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents: 18072
diff changeset
197 GHashTable* purple_core_get_ui_info(void);
d255d04c0aa1 core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents: 18072
diff changeset
198
6314
25bba03c42cd [gaim-migrate @ 6813]
Christian Hammond <chipx86@chipx86.com>
parents: 6182
diff changeset
199 #ifdef __cplusplus
25bba03c42cd [gaim-migrate @ 6813]
Christian Hammond <chipx86@chipx86.com>
parents: 6182
diff changeset
200 }
25bba03c42cd [gaim-migrate @ 6813]
Christian Hammond <chipx86@chipx86.com>
parents: 6182
diff changeset
201 #endif
25bba03c42cd [gaim-migrate @ 6813]
Christian Hammond <chipx86@chipx86.com>
parents: 6182
diff changeset
202
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
203 #endif /* _PURPLE_CORE_H_ */
5862
1099a19a8351 [gaim-migrate @ 6293]
Sean Egan <seanegan@pidgin.im>
parents: 5859
diff changeset
204
1099a19a8351 [gaim-migrate @ 6293]
Sean Egan <seanegan@pidgin.im>
parents: 5859
diff changeset
205 /*
1099a19a8351 [gaim-migrate @ 6293]
Sean Egan <seanegan@pidgin.im>
parents: 5859
diff changeset
206
1099a19a8351 [gaim-migrate @ 6293]
Sean Egan <seanegan@pidgin.im>
parents: 5859
diff changeset
207 /===-
1099a19a8351 [gaim-migrate @ 6293]
Sean Egan <seanegan@pidgin.im>
parents: 5859
diff changeset
208 `//"\\ """"`---.___.-""
1099a19a8351 [gaim-migrate @ 6293]
Sean Egan <seanegan@pidgin.im>
parents: 5859
diff changeset
209 ______-==| | | \\ _-"`
1099a19a8351 [gaim-migrate @ 6293]
Sean Egan <seanegan@pidgin.im>
parents: 5859
diff changeset
210 __--""" ,-/-==\\ | | `\ ,'
1099a19a8351 [gaim-migrate @ 6293]
Sean Egan <seanegan@pidgin.im>
parents: 5859
diff changeset
211 _-" /' | \\ ___ / / \ /
1099a19a8351 [gaim-migrate @ 6293]
Sean Egan <seanegan@pidgin.im>
parents: 5859
diff changeset
212 .' / | \\ /" "\ /' / \ /'
6169
d23c0f0228ae [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
213 / ____ / | \`\.__/-"" D O \_/' / \/'
d23c0f0228ae [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
214 /-'" """""---__ | "-/" O G R /' _--"`
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
215 \_| / R __--_ t ), __--""
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
216 '""--_/ T _-"_>--<_\ h '-" \
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
217 {\__--_/} / \\__>--<__\ e B \
6169
d23c0f0228ae [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
218 /' (_/ _-" | |__>--<__| U |
d23c0f0228ae [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
219 | _/) )-" | |__>--<__| R |
d23c0f0228ae [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
220 / /" ,_/ / /__>---<__/ N |
d23c0f0228ae [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
221 o-o _// /-"_>---<__-" I /
d23c0f0228ae [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
222 (^(" /"_>---<__- N _-"
d23c0f0228ae [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
223 ,/| /__>--<__/ A _-"
d23c0f0228ae [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
224 ,//('( |__>--<__| T / .----_
5862
1099a19a8351 [gaim-migrate @ 6293]
Sean Egan <seanegan@pidgin.im>
parents: 5859
diff changeset
225 ( ( ')) |__>--<__| | /' _---_"\
6169
d23c0f0228ae [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
226 `-)) )) ( |__>--<__| O | /' / "\`\
d23c0f0228ae [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
227 ,/,'//( ( \__>--<__\ R \ /' // ||
5862
1099a19a8351 [gaim-migrate @ 6293]
Sean Egan <seanegan@pidgin.im>
parents: 5859
diff changeset
228 ,( ( ((, )) "-__>--<_"-_ "--____---"' _/'/ /'
1099a19a8351 [gaim-migrate @ 6293]
Sean Egan <seanegan@pidgin.im>
parents: 5859
diff changeset
229 `"/ )` ) ,/| "-_">--<_/-__ __-" _/
1099a19a8351 [gaim-migrate @ 6293]
Sean Egan <seanegan@pidgin.im>
parents: 5859
diff changeset
230 ._-"//( )/ )) ` ""-'_/_/ /"""""""__--"
1099a19a8351 [gaim-migrate @ 6293]
Sean Egan <seanegan@pidgin.im>
parents: 5859
diff changeset
231 ;'( ')/ ,)( """"""""""
1099a19a8351 [gaim-migrate @ 6293]
Sean Egan <seanegan@pidgin.im>
parents: 5859
diff changeset
232 ' ') '( (/
1099a19a8351 [gaim-migrate @ 6293]
Sean Egan <seanegan@pidgin.im>
parents: 5859
diff changeset
233 ' ' `
1099a19a8351 [gaim-migrate @ 6293]
Sean Egan <seanegan@pidgin.im>
parents: 5859
diff changeset
234
1099a19a8351 [gaim-migrate @ 6293]
Sean Egan <seanegan@pidgin.im>
parents: 5859
diff changeset
235 */

mercurial