annotate libpurple/disco.h @ 26249: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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26249
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.h 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 #ifndef _PURPLE_DISCO_H_
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
28 #define _PURPLE_DISCO_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
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
31 typedef struct _PurpleDiscoList PurpleDiscoList;
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
32 typedef struct _PurpleDiscoService PurpleDiscoService;
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
33 typedef struct _PurpleDiscoUiOps PurpleDiscoUiOps;
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
34
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
35 #include "account.h"
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
36
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 * Represents a list of services for a given connection on a given protocol.
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 struct _PurpleDiscoList {
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
41 PurpleAccount *account; /**< The account this list belongs to. */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
42 GList *services; /**< The list of services. */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
43 gpointer *ui_data; /**< UI private data. */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
44 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
45 gint fetch_count; /**< Uses in fetch processes */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
46 gpointer proto_data; /** Prpl private data. */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
47 guint ref; /**< The reference count. */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
48 };
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 * The categories of services.
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 typedef enum
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 PURPLE_DISCO_SERVICE_CAT_UNSET,
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
56 PURPLE_DISCO_SERVICE_CAT_GATEWAY,
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
57 PURPLE_DISCO_SERVICE_CAT_DIRECTORY,
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
58 PURPLE_DISCO_SERVICE_CAT_MUC,
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
59 PURPLE_DISCO_SERVICE_CAT_OTHER
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
60 } PurpleDiscoServiceCategory;
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
61
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
62 /**
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
63 * The types of services.
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 typedef enum
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
66 {
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
67 PURPLE_DISCO_SERVICE_TYPE_NONE,
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
68 PURPLE_DISCO_SERVICE_TYPE_AIM,
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
69 PURPLE_DISCO_SERVICE_TYPE_GG,
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
70 PURPLE_DISCO_SERVICE_TYPE_GTALK,
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
71 PURPLE_DISCO_SERVICE_TYPE_ICQ,
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
72 PURPLE_DISCO_SERVICE_TYPE_IRC,
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
73 PURPLE_DISCO_SERVICE_TYPE_MAIL,
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
74 PURPLE_DISCO_SERVICE_TYPE_MSN
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
75 PURPLE_DISCO_SERVICE_TYPE_USER,
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
76 PURPLE_DISCO_SERVICE_TYPE_QQ,
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_SERVICE_TYPE_XMPP,
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
78 PURPLE_DISCO_SERVICE_TYPE_YAHOO,
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
79 } PurpleDiscoServiceType;
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 /**
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
82 * The flags of services.
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 #define PURPLE_DISCO_FLAG_NONE 0
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
85 #define PURPLE_DISCO_FLAG_ADD 1 << 0
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
86 #define PURPLE_DISCO_FLAG_BROWSE 1 << 1
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
87 #define PURPLE_DISCO_FLAG_REGISTER 1 << 2
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 /**
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
90 * Represents a list of services for a given connection on a given protocol.
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
91 */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
92 struct _PurpleDiscoService {
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
93 PurpleDiscoList *list;
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
94 PurpleDiscoServiceCategory category; /**< The category of service. */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
95 gchar *name; /**< The name of the service. */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
96 PurpleDiscoServiceType type; /**< The type of service. */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
97 guint flags;
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
98 gchar *description; /**< The name of the service. */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
99 };
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 struct _PurpleDiscoUiOps {
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
102 void (*dialog_show_with_account)(PurpleAccount* account); /**< Force the ui to pop up a dialog */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
103 void (*create)(PurpleDiscoList *list); /**< Init ui resources */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
104 void (*destroy)(PurpleDiscoList *list); /**< Free ui resources */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
105 void (*add_service)(PurpleDiscoList *list, PurpleDiscoService *service, PurpleDiscoService *parent); /**< Add service to dialog */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
106 void (*in_progress)(PurpleDiscoList *list, gboolean in_progress); /**< Set progress to dialog */
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
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
109 #ifdef __cplusplus
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
110 extern "C" {
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
111 #endif
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 /**
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
114 * Returns a newly created service discovery object.
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
115 *
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
116 * It has an initial reference count of 1.
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
117 *
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
118 * @param account The account that's listing rooms.
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
119 * @return The new service discovery list handle.
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
120 */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
121 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
122
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 * Increases the reference count on the service discovery list.
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
125 *
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
126 * @param list The object to ref.
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
127 */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
128 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
129
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
130 /**
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
131 * Decreases the reference count on the service discovery list.
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
132 *
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
133 * The room list will be destroyed when this reaches 0.
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
134 *
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
135 * @param list The room list object to unref and possibly
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
136 * destroy.
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
137 */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
138 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
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 * Instructs the prpl to start fetching the 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 * @param gc The PurpleConnection to have get a list.
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
144 *
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
145 */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
146 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
147
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 * Tells the prpl to stop fetching the list.
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
150 * If this is possible and done, the prpl will
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
151 * call set_in_progress with @c FALSE and possibly
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
152 * unref the list if it took a reference.
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
153 *
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
154 * @param list The service list to cancel a get_list on.
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 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
157
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 * Create new service object
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
160 */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
161 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
162 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
163
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 * Add service to list
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
166 */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
167 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
168
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 * Set the "in progress" state of the Service Discovery.
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 * The UI is encouraged to somehow hint to the user
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
173 * whether or not we're busy downloading a service list or not.
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 * @param list The service list.
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
176 * @param in_progress We're downloading it, or we're not.
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 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
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 * Gets the "in progress" state of the Service Discovery.
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 * The UI is encouraged to somehow hint to the user
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
184 * whether or not we're busy downloading a service list or not.
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
185 *
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
186 * @param list The service list.
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
187 * @return True if we're downloading it, or false if we're not.
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
188 */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
189 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
190
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
191
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 * Sets the UI operations structure to be used in all purple service discovery.
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 * @param ops The UI operations structure.
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 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
198
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 * Register service
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
201 * @param gc Connection
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
202 * @param service The service that will be registered
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
203 */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
204 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
205
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
206 /**< Set/Get the account this list belongs to. */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
207 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
208 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
209
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
210 /**< The list of services. */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
211 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
212
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
213 /**< Set/Get UI private data. */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
214 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
215 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
216
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
217 /** Set/Get in progress flag */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
218 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
219 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
220
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
221 /** Set/Get fetch counter */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
222 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
223 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
224
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
225 /** Set/Get prpl private data. */
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
226 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
227 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
228
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
229 #ifdef __cplusplus
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
230 }
a5010188c01e Add the files I forgot to `mtn add` earlier (also, alphabetized disco.h
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
231 #endif
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 #endif /* _PURPLE_DISCO_H_ */