libpurple/core.h

Thu, 31 May 2012 03:48:16 +0000

author
Paul Aurich <darkrain42@pidgin.im>
date
Thu, 31 May 2012 03:48:16 +0000
changeset 32999
c5a6f28a75ab
parent 32787
7072f190d6ad
child 33955
55aa58076485
permissions
-rw-r--r--

propagate from branch 'im.pidgin.pidgin.2.x.y' (head 0aa32fc00dc281d336971ef3966efe6652dc1bf6)
to branch 'im.pidgin.pidgin' (head 89f064bdd762e62b3e3d3a2153cece816879cee9)

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 */
28422
d866502c9a96 Make the doxygen docs easier to navigate. It was either this or a main page that says "Click on 'Modules'".
Paul Aurich <darkrain42@pidgin.im>
parents: 27408
diff changeset
27
d866502c9a96 Make the doxygen docs easier to navigate. It was either this or a main page that says "Click on 'Modules'".
Paul Aurich <darkrain42@pidgin.im>
parents: 27408
diff changeset
28 /*! @mainpage Pidgin/Finch/libpurple API Documentation
d866502c9a96 Make the doxygen docs easier to navigate. It was either this or a main page that says "Click on 'Modules'".
Paul Aurich <darkrain42@pidgin.im>
parents: 27408
diff changeset
29 *
d866502c9a96 Make the doxygen docs easier to navigate. It was either this or a main page that says "Click on 'Modules'".
Paul Aurich <darkrain42@pidgin.im>
parents: 27408
diff changeset
30 * <a href="group__core.html">libpurple</a> is intended to be the core of an IM
d866502c9a96 Make the doxygen docs easier to navigate. It was either this or a main page that says "Click on 'Modules'".
Paul Aurich <darkrain42@pidgin.im>
parents: 27408
diff changeset
31 * program. <a href="group__pidgin.html">Pidgin</a> is a GTK+ frontend
d866502c9a96 Make the doxygen docs easier to navigate. It was either this or a main page that says "Click on 'Modules'".
Paul Aurich <darkrain42@pidgin.im>
parents: 27408
diff changeset
32 * to libpurple, and <a href="group__finch.html">Finch</a> is an ncurses
d866502c9a96 Make the doxygen docs easier to navigate. It was either this or a main page that says "Click on 'Modules'".
Paul Aurich <darkrain42@pidgin.im>
parents: 27408
diff changeset
33 * frontend built using <a href="group__gnt.html">libgnt</a>
d866502c9a96 Make the doxygen docs easier to navigate. It was either this or a main page that says "Click on 'Modules'".
Paul Aurich <darkrain42@pidgin.im>
parents: 27408
diff changeset
34 * (GLib Ncurses Toolkit).
d866502c9a96 Make the doxygen docs easier to navigate. It was either this or a main page that says "Click on 'Modules'".
Paul Aurich <darkrain42@pidgin.im>
parents: 27408
diff changeset
35 */
d866502c9a96 Make the doxygen docs easier to navigate. It was either this or a main page that says "Click on 'Modules'".
Paul Aurich <darkrain42@pidgin.im>
parents: 27408
diff changeset
36
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
37 #ifndef _PURPLE_CORE_H_
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
38 #define _PURPLE_CORE_H_
2417
7751d1269b09 [gaim-migrate @ 2430]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
39
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
40 typedef struct PurpleCore PurpleCore;
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
41
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
42 /** 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
43 * 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
44 * UI.
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
45 */
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
46 typedef struct
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
47 {
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
48 /** 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
49 * 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
50 * 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
51 */
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
52 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
53 /** 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
54 * 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
55 * 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
56 * 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
57 * initialization.
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 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
60 /** 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
61 * 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
62 *
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
63 * @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
64 */
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
65 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
66 /** Called after most of libpurple has been uninitialized. */
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
67 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
68
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
69 /** 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
70 * documented there.
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
71 */
18441
d255d04c0aa1 core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents: 18072
diff changeset
72 GHashTable* (*get_ui_info)(void);
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
73
16743
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 16409
diff changeset
74 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
75 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
76 void (*_purple_reserved3)(void);
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
77 } PurpleCoreUiOps;
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
78
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32604
diff changeset
79 G_BEGIN_DECLS
6314
25bba03c42cd [gaim-migrate @ 6813]
Christian Hammond <chipx86@chipx86.com>
parents: 6182
diff changeset
80
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
81 /**
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
82 * Initializes the core of purple.
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
83 *
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
84 * This will setup preferences for all the core subsystems.
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
85 *
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
86 * @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
87 * unique ID, registered with the purple team.
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
88 *
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
89 * @return @c TRUE if successful, or @c FALSE otherwise.
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
90 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
91 gboolean purple_core_init(const char *ui);
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
92
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
93 /**
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
94 * 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
95 * application using the purple core.
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
96 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
97 void purple_core_quit(void);
2417
7751d1269b09 [gaim-migrate @ 2430]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
98
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
99 /**
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
100 * <p>
25888
d0fdd378a635 Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 23545
diff changeset
101 * Calls purple_core_quit(). This can be used as the function
d0fdd378a635 Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 23545
diff changeset
102 * passed to purple_timeout_add() when you want to shutdown Purple
d0fdd378a635 Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 23545
diff changeset
103 * 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
104 * from a plugin, you must use this instead of purple_core_quit();
25888
d0fdd378a635 Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 23545
diff changeset
105 * 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
106 * </p>
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
107 *
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
108 * <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
109 *
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
110 * <p>
25888
d0fdd378a635 Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 23545
diff changeset
111 * 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
112 * 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
113 * 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
114 * 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
115 * 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
116 * </p>
7646
6806a6893ac0 [gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents: 7082
diff changeset
117 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
118 gboolean purple_core_quit_cb(gpointer unused);
7646
6806a6893ac0 [gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents: 7082
diff changeset
119
6806a6893ac0 [gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents: 7082
diff changeset
120 /**
6612
aac6af649208 [gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents: 6314
diff changeset
121 * Returns the version of the core library.
aac6af649208 [gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents: 6314
diff changeset
122 *
aac6af649208 [gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents: 6314
diff changeset
123 * @return The version of the core library.
aac6af649208 [gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents: 6314
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_version(void);
6612
aac6af649208 [gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents: 6314
diff changeset
126
aac6af649208 [gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents: 6314
diff changeset
127 /**
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
128 * 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
129 * purple_core_init().
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
130 *
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
131 * @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
132 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
133 const char *purple_core_get_ui(void);
6179
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 /**
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
136 * Returns a handle to the purple core.
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
137 *
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
138 * 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
139 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
140 PurpleCore *purple_get_core(void);
6179
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 /**
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
143 * Sets the UI ops for the core.
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
144 *
12369
5635c1f02708 [gaim-migrate @ 14673]
Peter Lawler <pidgin@bleeter.id.au>
parents: 11035
diff changeset
145 * @param ops A UI ops structure for the core.
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
146 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
147 void purple_core_set_ui_ops(PurpleCoreUiOps *ops);
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
148
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
149 /**
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
150 * Returns the UI ops for the core.
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
151 *
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
152 * @return The core's UI ops structure.
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
153 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
154 PurpleCoreUiOps *purple_core_get_ui_ops(void);
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
155
16409
8c153c6febdd The core portion of the migration code. This is implemented as I described
Richard Laager <rlaager@pidgin.im>
parents: 16256
diff changeset
156 /**
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
157 * 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
158 * 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
159 * 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
160 * process.
17121
43d41f5ce17b Alternative dbus_uniq implementation
Gabriel Schulhof <nix@go-nix.ca>
parents: 16743
diff changeset
161 *
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
162 * @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
163 * @c FALSE if there is another instance running.
17121
43d41f5ce17b Alternative dbus_uniq implementation
Gabriel Schulhof <nix@go-nix.ca>
parents: 16743
diff changeset
164 */
43d41f5ce17b Alternative dbus_uniq implementation
Gabriel Schulhof <nix@go-nix.ca>
parents: 16743
diff changeset
165 gboolean purple_core_ensure_single_instance(void);
43d41f5ce17b Alternative dbus_uniq implementation
Gabriel Schulhof <nix@go-nix.ca>
parents: 16743
diff changeset
166
18441
d255d04c0aa1 core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents: 18072
diff changeset
167 /**
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
168 * 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
169 * 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
170 * 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
171 *
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
172 * <dl>
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
173 * <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
174 * <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
175 *
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
176 * <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
177 * <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
178 *
676b13ddfd2c Added "website" and "dev_website" items to the ui_info GHashTable,
Evan Schoenberg <evands@pidgin.im>
parents: 23511
diff changeset
179 * <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
180 * <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
181 *
676b13ddfd2c Added "website" and "dev_website" items to the ui_info GHashTable,
Evan Schoenberg <evands@pidgin.im>
parents: 23511
diff changeset
182 * <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
183 * <dd>the UI's development/support website, such as http://developer.pidgin.im.</dd>
25577
ca0b40451bbc Set a value "type" in the ui_info hash table
Marcus Lundblad <malu@pidgin.im>
parents: 23545
diff changeset
184 *
25578
c0c1b73f4fb1 Changed "type" to "client_type" for the hash value specifying client type
Marcus Lundblad <malu@pidgin.im>
parents: 25577
diff changeset
185 * <dt><tt>client_type</tt></dt>
27408
056092bcdfd4 Clarify the usage of client_type (i.e. these values are matched against using
Paul Aurich <darkrain42@pidgin.im>
parents: 26046
diff changeset
186 * <dd>the type of UI. Possible values include 'pc', 'console', 'phone',
056092bcdfd4 Clarify the usage of client_type (i.e. these values are matched against using
Paul Aurich <darkrain42@pidgin.im>
parents: 26046
diff changeset
187 * 'handheld', 'web', and 'bot'. These values are compared
056092bcdfd4 Clarify the usage of client_type (i.e. these values are matched against using
Paul Aurich <darkrain42@pidgin.im>
parents: 26046
diff changeset
188 * programmatically and should not be localized.</dd>
31293
169eeb43b52c Remove trailing whitespace
Richard Laager <rlaager@pidgin.im>
parents: 28422
diff changeset
189 *
23511
650ebfc167ab Document PurpleCoreUiOps and purple_core_get_ui_info(), tweaking other core
Will Thompson <resiak@pidgin.im>
parents: 22107
diff changeset
190 * </dl>
18441
d255d04c0aa1 core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents: 18072
diff changeset
191 *
d255d04c0aa1 core support for UI info...now to do the UI piece
Nathan Walp <nwalp@pidgin.im>
parents: 18072
diff changeset
192 * @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
193 * 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
194 *
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 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
197
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32604
diff changeset
198 G_END_DECLS
6314
25bba03c42cd [gaim-migrate @ 6813]
Christian Hammond <chipx86@chipx86.com>
parents: 6182
diff changeset
199
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
200 #endif /* _PURPLE_CORE_H_ */
5862
1099a19a8351 [gaim-migrate @ 6293]
Sean Egan <seanegan@pidgin.im>
parents: 5859
diff changeset
201
1099a19a8351 [gaim-migrate @ 6293]
Sean Egan <seanegan@pidgin.im>
parents: 5859
diff changeset
202 /*
1099a19a8351 [gaim-migrate @ 6293]
Sean Egan <seanegan@pidgin.im>
parents: 5859
diff changeset
203
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 .' / | \\ /" "\ /' / \ /'
6169
d23c0f0228ae [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
210 / ____ / | \`\.__/-"" D O \_/' / \/'
d23c0f0228ae [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
211 /-'" """""---__ | "-/" O G R /' _--"`
6179
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
212 \_| / R __--_ t ), __--""
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
213 '""--_/ T _-"_>--<_\ h '-" \
4df73df94250 [gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents: 6169
diff changeset
214 {\__--_/} / \\__>--<__\ e B \
6169
d23c0f0228ae [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
215 /' (_/ _-" | |__>--<__| U |
d23c0f0228ae [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
216 | _/) )-" | |__>--<__| R |
d23c0f0228ae [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
217 / /" ,_/ / /__>---<__/ N |
d23c0f0228ae [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
218 o-o _// /-"_>---<__-" I /
d23c0f0228ae [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
219 (^(" /"_>---<__- N _-"
d23c0f0228ae [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
220 ,/| /__>--<__/ A _-"
d23c0f0228ae [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
221 ,//('( |__>--<__| T / .----_
5862
1099a19a8351 [gaim-migrate @ 6293]
Sean Egan <seanegan@pidgin.im>
parents: 5859
diff changeset
222 ( ( ')) |__>--<__| | /' _---_"\
6169
d23c0f0228ae [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
223 `-)) )) ( |__>--<__| O | /' / "\`\
d23c0f0228ae [gaim-migrate @ 6652]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
224 ,/,'//( ( \__>--<__\ R \ /' // ||
5862
1099a19a8351 [gaim-migrate @ 6293]
Sean Egan <seanegan@pidgin.im>
parents: 5859
diff changeset
225 ,( ( ((, )) "-__>--<_"-_ "--____---"' _/'/ /'
1099a19a8351 [gaim-migrate @ 6293]
Sean Egan <seanegan@pidgin.im>
parents: 5859
diff changeset
226 `"/ )` ) ,/| "-_">--<_/-__ __-" _/
1099a19a8351 [gaim-migrate @ 6293]
Sean Egan <seanegan@pidgin.im>
parents: 5859
diff changeset
227 ._-"//( )/ )) ` ""-'_/_/ /"""""""__--"
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 */

mercurial