Mercurial > pidgin.yaz
annotate libpurple/disco.c @ 26331:a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
enum a bit)
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Sun, 29 Mar 2009 19:43:32 +0000 |
parents | |
children | 2efdd76f5dc0 |
rev | line source |
---|---|
26331
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
1 /** |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
2 * @file disco.c Service Discovery API |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
3 * @ingroup core |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
4 */ |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
5 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
6 /* purple |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
7 * |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
8 * Purple is the legal property of its developers, whose names are too numerous |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
9 * to list here. Please refer to the COPYRIGHT file distributed with this |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
10 * source distribution. |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
11 * |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
12 * This program is free software; you can redistribute it and/or modify |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
13 * it under the terms of the GNU General Public License as published by |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
14 * the Free Software Foundation; either version 2 of the License, or |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
15 * (at your option) any later version. |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
16 * |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
17 * This program is distributed in the hope that it will be useful, |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
20 * GNU General Public License for more details. |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
21 * |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
22 * You should have received a copy of the GNU General Public License |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
23 * along with this program; if not, write to the Free Software |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
25 */ |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
26 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
27 #include "internal.h" |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
28 #include "debug.h" |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
29 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
30 #include "disco.h" |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
31 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
32 static PurpleDiscoUiOps *ops = NULL; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
33 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
34 PurpleDiscoList *purple_disco_list_new(PurpleAccount *account, void *ui_data) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
35 { |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
36 PurpleDiscoList *list; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
37 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
38 g_return_val_if_fail(account != NULL, NULL); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
39 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
40 list = g_new0(PurpleDiscoList, 1); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
41 list->account = account; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
42 list->ref = 1; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
43 list->ui_data = ui_data; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
44 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
45 if (ops && ops->create) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
46 ops->create(list); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
47 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
48 return list; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
49 } |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
50 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
51 void purple_disco_list_ref(PurpleDiscoList *list) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
52 { |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
53 g_return_if_fail(list != NULL); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
54 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
55 list->ref++; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
56 purple_debug_misc("disco", "reffing list, ref count now %d\n", list->ref); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
57 } |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
58 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
59 static void purple_disco_list_service_destroy(PurpleDiscoList *list, PurpleDiscoService *r) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
60 { |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
61 g_free(r->name); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
62 g_free(r->description); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
63 g_free(r); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
64 } |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
65 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
66 static void purple_disco_list_destroy(PurpleDiscoList *list) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
67 { |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
68 GList *l; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
69 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
70 purple_debug_misc("disco", "destroying list %p\n", list); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
71 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
72 if (ops && ops->destroy) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
73 ops->destroy(list); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
74 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
75 for (l = list->services; l; l = l->next) { |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
76 PurpleDiscoService *s = l->data; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
77 purple_disco_list_service_destroy(list, s); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
78 } |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
79 g_list_free(list->services); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
80 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
81 g_free(list); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
82 } |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
83 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
84 void purple_disco_list_unref(PurpleDiscoList *list) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
85 { |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
86 g_return_if_fail(list != NULL); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
87 g_return_if_fail(list->ref > 0); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
88 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
89 list->ref--; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
90 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
91 purple_debug_misc("disco", "unreffing list, ref count now %d\n", list->ref); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
92 if (list->ref == 0) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
93 purple_disco_list_destroy(list); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
94 } |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
95 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
96 void purple_disco_list_service_add(PurpleDiscoList *list, PurpleDiscoService *service, PurpleDiscoService *parent) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
97 { |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
98 g_return_if_fail(list != NULL); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
99 g_return_if_fail(service != NULL); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
100 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
101 list->services = g_list_append(list->services, service); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
102 service->list = list; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
103 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
104 if (ops && ops->add_service) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
105 ops->add_service(list, service, parent); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
106 } |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
107 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
108 PurpleDiscoService *purple_disco_list_service_new(PurpleDiscoServiceCategory category, const gchar *name, |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
109 PurpleDiscoServiceType type, const gchar *description, int flags) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
110 { |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
111 PurpleDiscoService *s; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
112 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
113 g_return_val_if_fail(name != NULL, NULL); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
114 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
115 s = g_new0(PurpleDiscoService, 1); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
116 s->category = category; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
117 s->name = g_strdup(name); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
118 s->type = type; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
119 s->description = g_strdup(description); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
120 s->flags = flags; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
121 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
122 return s; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
123 } |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
124 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
125 void purple_disco_get_list(PurpleConnection *gc, PurpleDiscoList *list) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
126 { |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
127 PurplePlugin *prpl = NULL; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
128 PurplePluginProtocolInfo *prpl_info = NULL; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
129 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
130 g_return_if_fail(gc != NULL); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
131 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
132 prpl = purple_connection_get_prpl(gc); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
133 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
134 if (prpl != NULL) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
135 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
136 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
137 if (prpl_info && PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, disco_get_list)) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
138 prpl_info->disco_get_list(gc, list); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
139 } |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
140 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
141 void purple_disco_cancel_get_list(PurpleDiscoList *list) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
142 { |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
143 PurplePlugin *prpl = NULL; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
144 PurplePluginProtocolInfo *prpl_info = NULL; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
145 PurpleConnection *gc; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
146 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
147 g_return_if_fail(list != NULL); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
148 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
149 gc = purple_account_get_connection(list->account); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
150 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
151 g_return_if_fail(gc != NULL); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
152 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
153 if (gc) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
154 prpl = purple_connection_get_prpl(gc); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
155 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
156 if (prpl) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
157 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
158 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
159 if (prpl_info && PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, disco_cancel)) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
160 prpl_info->disco_cancel(list); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
161 } |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
162 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
163 int purple_disco_service_register(PurpleConnection *gc, PurpleDiscoService *service) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
164 { |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
165 PurplePlugin *prpl = NULL; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
166 PurplePluginProtocolInfo *prpl_info = NULL; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
167 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
168 g_return_val_if_fail(gc != NULL, -EINVAL); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
169 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
170 prpl = purple_connection_get_prpl(gc); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
171 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
172 if (prpl != NULL) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
173 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
174 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
175 if (prpl_info && PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, disco_service_register)) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
176 return prpl_info->disco_service_register(gc, service); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
177 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
178 return -EINVAL; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
179 } |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
180 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
181 void purple_disco_set_in_progress(PurpleDiscoList *list, gboolean in_progress) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
182 { |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
183 g_return_if_fail(list != NULL); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
184 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
185 list->in_progress = in_progress; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
186 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
187 if (ops && ops->in_progress) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
188 ops->in_progress(list, in_progress); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
189 } |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
190 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
191 gboolean purple_disco_get_in_progress(PurpleDiscoList *list) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
192 { |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
193 g_return_val_if_fail(list != NULL, FALSE); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
194 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
195 return list->in_progress; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
196 } |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
197 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
198 void purple_disco_list_set_account(PurpleDiscoList *list, PurpleAccount *account) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
199 { |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
200 list->account = account; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
201 } |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
202 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
203 PurpleAccount* purple_disco_list_get_account(PurpleDiscoList *list) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
204 { |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
205 return list->account; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
206 } |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
207 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
208 GList* spurple_disco_list_get_services(PurpleDiscoList *dl) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
209 { |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
210 return dl->services; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
211 } |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
212 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
213 void purple_disco_list_set_ui_data(PurpleDiscoList *list, gpointer ui_data) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
214 { |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
215 list->ui_data = ui_data; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
216 } |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
217 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
218 gpointer purple_disco_list_get_ui_data(PurpleDiscoList *list) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
219 { |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
220 return list->ui_data; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
221 } |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
222 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
223 void purple_disco_list_set_in_progress(PurpleDiscoList *list, gboolean in_progress) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
224 { |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
225 list->in_progress = in_progress; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
226 } |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
227 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
228 gboolean purple_disco_list_get_in_progress(PurpleDiscoList *list) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
229 { |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
230 return list->in_progress; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
231 } |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
232 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
233 void purple_disco_list_set_fetch_count(PurpleDiscoList *list, gint fetch_count) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
234 { |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
235 list->fetch_count = fetch_count; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
236 purple_debug_info("disco", "fetch_count = %d\n", fetch_count); |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
237 } |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
238 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
239 gint purple_disco_list_get_fetch_count(PurpleDiscoList *list) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
240 { |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
241 return list->fetch_count; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
242 } |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
243 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
244 void purple_disco_list_set_proto_data(PurpleDiscoList *list, gpointer proto_data) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
245 { |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
246 list->proto_data = proto_data; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
247 } |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
248 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
249 gpointer purple_disco_list_get_proto_data(PurpleDiscoList *list) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
250 { |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
251 return list->proto_data; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
252 } |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
253 |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
254 void purple_disco_set_ui_ops(PurpleDiscoUiOps *ui_ops) |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
255 { |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
256 ops = ui_ops; |
a5010188c01e
Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff
changeset
|
257 } |