pidgin/pidginprotocolstore.h

Sat, 30 Jan 2021 22:33:58 -0600

author
Gary Kramlich <grim@reaperworld.com>
date
Sat, 30 Jan 2021 22:33:58 -0600
changeset 40749
b7ee9469eccc
parent 40741
850137e8737c
child 41124
95555046173e
permissions
-rw-r--r--

g_task_return_* refs a task so we need to make sure we remove our reference when we're done with the task.

Testing Done:
Compiled and connected to bonjour and xmpp locally.

Reviewed at https://reviews.imfreedom.org/r/470/

40296
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /* pidgin
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 *
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * Pidgin is the legal property of its developers, whose names are too numerous
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 * to list here. Please refer to the COPYRIGHT file distributed with this
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 * source distribution.
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 *
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * (at your option) any later version.
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 *
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * GNU General Public License for more details.
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 *
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 */
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21
40502
875489636847 pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents: 40302
diff changeset
22 #if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION)
875489636847 pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents: 40302
diff changeset
23 # error "only <pidgin.h> may be included directly"
875489636847 pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents: 40302
diff changeset
24 #endif
875489636847 pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents: 40302
diff changeset
25
40296
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26 #ifndef PIDGIN_PROTOCOL_STORE_H
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 #define PIDGIN_PROTOCOL_STORE_H
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29 /**
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 * SECTION:pidginprotocolstore
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31 * @section_id: pidgin-protocol-store
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32 * @short_description: A GtkListStore that keeps track of protocols
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33 * @title: Protocol Store
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34 *
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35 * #PidginProtocolStore is a #GtkListStore that automatically keeps track of
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 * what protocols are currently available in libpurple. It's intended to be
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37 * used any time that you need to present a protocol selection to the user.
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 */
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40 #include <gtk/gtk.h>
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42 #include <purple.h>
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43
40711
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40502
diff changeset
44 /**
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40502
diff changeset
45 * PidginProtocolStoreColumn:
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40502
diff changeset
46 * @PIDGIN_PROTOCOL_STORE_COLUMN_PROTOCOL: This column holds a reference to a
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40502
diff changeset
47 * #PurpleProtocol.
40741
850137e8737c Select the proper protocol in the account editor.
Gary Kramlich <grim@reaperworld.com>
parents: 40711
diff changeset
48 * @PIDGIN_PROTOCOL_STORE_COLUMN_ID: This column holds the id of the protocol.
40711
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40502
diff changeset
49 * @PIDGIN_PROTOCOL_STORE_COLUMN_NAME: This column holds the name of the
40741
850137e8737c Select the proper protocol in the account editor.
Gary Kramlich <grim@reaperworld.com>
parents: 40711
diff changeset
50 * protocol which is used for display.
40711
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40502
diff changeset
51 * @PIDGIN_PROTOCOL_STORE_COLUMN_ICON: This column holds a #GdkPixbuf of the
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40502
diff changeset
52 * logo of the protocol.
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40502
diff changeset
53 *
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40502
diff changeset
54 * Constants for accessing columns in a #PidginProtocolStore.
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40502
diff changeset
55 *
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40502
diff changeset
56 * Since: 3.0.0
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40502
diff changeset
57 */
40296
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 typedef enum {
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59 PIDGIN_PROTOCOL_STORE_COLUMN_PROTOCOL,
40741
850137e8737c Select the proper protocol in the account editor.
Gary Kramlich <grim@reaperworld.com>
parents: 40711
diff changeset
60 PIDGIN_PROTOCOL_STORE_COLUMN_ID,
40296
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
61 PIDGIN_PROTOCOL_STORE_COLUMN_NAME,
40302
28deeeb1ecdf Fix some issues found in review
Gary Kramlich <grim@reaperworld.com>
parents: 40297
diff changeset
62 PIDGIN_PROTOCOL_STORE_COLUMN_ICON,
40711
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40502
diff changeset
63 /*< private >*/
40296
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
64 PIDGIN_PROTOCOL_STORE_N_COLUMNS,
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
65 } PidginProtocolStoreColumn;
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
66
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
67 G_BEGIN_DECLS
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
68
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
69 #define PIDGIN_TYPE_PROTOCOL_STORE pidgin_protocol_store_get_type()
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
70
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
71 G_DECLARE_FINAL_TYPE(PidginProtocolStore, pidgin_protocol_store, PIDGIN,
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
72 PROTOCOL_STORE, GtkListStore)
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
73
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
74 /**
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
75 * pidgin_protocol_store_new:
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
76 *
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
77 * Creates a new #PidginProtocolStore that can be used anywhere a #GtkListStore
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
78 * can be used.
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
79 *
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
80 * Returns: (transfer full): The new #PidginProtocolStore instance.
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
81 *
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
82 * Since: 3.0.0
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
83 */
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
84 GtkListStore *pidgin_protocol_store_new(void);
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
85
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
86 G_END_DECLS
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
87
c9900fc6e689 Initial start of PidginProtocolStore
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
88 #endif /* PIDGIN_PROTOCOL_STORE_H */

mercurial