pidgin/pidginaccountstore.h

Sun, 09 Jan 2022 12:11:21 -0600

author
Gary Kramlich <grim@reaperworld.com>
date
Sun, 09 Jan 2022 12:11:21 -0600
changeset 41240
943ba4838efc
parent 41124
95555046173e
child 41276
03f98ece6b26
permissions
-rw-r--r--

Remove some deprecated accounts api

Testing Done:
Compiled and ran

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

40534
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * Pidgin - Internet Messenger
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 *
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 * Pidgin is the legal property of its developers, whose names are too numerous
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 * source distribution.
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 *
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * (at your option) any later version.
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 *
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 * GNU General Public License for more details.
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 *
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
40539
2941deda6d8d Use an https link to gnu.org in the license file headers
Gary Kramlich <grim@reaperworld.com>
parents: 40534
diff changeset
20 * along with this program; if not, see <https://www.gnu.org/licenses/>.
40534
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 */
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 #ifndef PIDGIN_ACCOUNT_STORE_H
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 #define PIDGIN_ACCOUNT_STORE_H
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25
41124
95555046173e Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40711
diff changeset
26 #include <gtk/gtk.h>
95555046173e Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40711
diff changeset
27
95555046173e Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40711
diff changeset
28 #include <purple.h>
95555046173e Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40711
diff changeset
29
40534
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 /**
41124
95555046173e Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40711
diff changeset
31 * PidginAccountStore:
40534
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32 *
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33 * #PidginAccountStore is a #GtkListStore that automatically keeps track of
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34 * what accounts are currently available in libpurple. It's intended to be
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35 * used any time that you need to present an account selection to the user.
41124
95555046173e Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40711
diff changeset
36 *
95555046173e Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40711
diff changeset
37 * Since: 3.0.0
40534
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 */
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39
40711
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40539
diff changeset
40 /**
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40539
diff changeset
41 * PidginAccountStoreColumn:
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40539
diff changeset
42 * @PIDGIN_ACCOUNT_STORE_COLUMN_ACCOUNT: This column holds a reference to the
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40539
diff changeset
43 * #PurpleAccount.
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40539
diff changeset
44 * @PIDGIN_ACCOUNT_STORE_COLUMN_MARKUP: This column holds a pango markup to
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40539
diff changeset
45 * display the account to the user.
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40539
diff changeset
46 * @PIDGIN_ACCOUNT_STORE_COLUMN_ICON: This column holds an icon in a #GdkPixbuf
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40539
diff changeset
47 * for the account.
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40539
diff changeset
48 *
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40539
diff changeset
49 * Constants for accessing columns in a #PidginAccountStore.
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40539
diff changeset
50 *
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40539
diff changeset
51 * Since: 3.0.0
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40539
diff changeset
52 */
40534
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
53 typedef enum {
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54 PIDGIN_ACCOUNT_STORE_COLUMN_ACCOUNT,
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55 PIDGIN_ACCOUNT_STORE_COLUMN_MARKUP,
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 PIDGIN_ACCOUNT_STORE_COLUMN_ICON,
40711
3ec3eae31fe4 Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents: 40539
diff changeset
57 /*< private >*/
40534
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 PIDGIN_ACCOUNT_STORE_N_COLUMNS,
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59 } PidginAccountStoreColumn;
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
60
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
61 G_BEGIN_DECLS
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
62
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
63 #define PIDGIN_TYPE_ACCOUNT_STORE pidgin_account_store_get_type()
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
64 G_DECLARE_FINAL_TYPE(PidginAccountStore, pidgin_account_store, PIDGIN,
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
65 ACCOUNT_STORE, GtkListStore)
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
66
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
67 /**
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
68 * pidgin_account_store_new:
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
69 *
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
70 * Creates a new #PidginAccountStore that can be used anywhere a #GtkListStore
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
71 * can be used.
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
72 *
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
73 * Returns: (transfer full): The new #PidginAccountStore instance.
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
74 *
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
75 * Since: 3.0.0
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
76 */
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
77 GtkListStore *pidgin_account_store_new(void);
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
78
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
79 /**
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
80 * pidgin_account_store_filter_connected:
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
81 * @model: The #GtkTreeModel that's being filtered.
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
82 * @iter: The #GtkTreeIter to check.
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
83 * @data: Userdata passed to gtk_tree_model_filter_set_visible_func().
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
84 *
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
85 * pidgin_account_store_filter_connected() is a #GtkTreeModelFilterVisibleFunc
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
86 * that can be set on a #GtkTreeModelFilter via
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
87 * gtk_tree_model_filter_set_visible_func(), to only show accounts that are
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
88 * currently connected.
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
89 *
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
90 * Returns: %TRUE if the account will be displayed, %FALSE otherwise.
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
91 */
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
92 gboolean pidgin_account_store_filter_connected(GtkTreeModel *model, GtkTreeIter *iter, gpointer data);
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
93
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
94 G_END_DECLS
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
95
8dad2981fb86 Separate the AccountChooser from its model and move options to filters
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
96 #endif /* PIDGIN_ACCOUNT_STORE_H */

mercurial