annotate pidgin/plugins/disco/gtkdisco.h @ 27058:08964b4b2fe4

Convert the disco browser to a plugin. Refs #556
author Paul Aurich <paul@darkrain42.org>
date Tue, 26 May 2009 02:27:49 +0000
parents
children abf989278782
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27058
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
1 /* pidgin
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
2 *
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
3 * Pidgin is the legal property of its developers, whose names are too numerous
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
4 * to list here. Please refer to the COPYRIGHT file distributed with this
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
5 * source distribution.
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
6 *
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
10 * (at your option) any later version.
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
11 *
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
15 * GNU General Public License for more details.
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
16 *
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
20 */
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
21
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
22 #ifndef PIDGIN_XMPP_DISCO_UI_H
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
23 #define PIDGIN_XMPP_DISCO_UI_H
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
24
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
25 typedef struct _PidginDiscoDialog PidginDiscoDialog;
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
26 typedef struct _PidginDiscoList PidginDiscoList;
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
27
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
28 #include "xmppdisco.h"
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
29
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
30 struct _PidginDiscoDialog {
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
31 GtkWidget *window;
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
32 GtkWidget *account_widget;
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
33
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
34 GtkWidget *sw;
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
35 GtkWidget *progress;
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
36
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
37 GtkWidget *stop_button;
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
38 GtkWidget *browse_button;
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
39 GtkWidget *register_button;
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
40 GtkWidget *add_button;
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
41 GtkWidget *close_button;
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
42
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
43 PurpleAccount *account;
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
44 PidginDiscoList *discolist;
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
45 };
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
46
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
47 struct _PidginDiscoList {
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
48 PurpleConnection *pc;
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
49 gboolean in_progress;
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
50 const gchar *server;
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
51
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
52 gint ref;
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
53 guint fetch_count;
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
54
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
55 PidginDiscoDialog *dialog;
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
56 GtkTreeStore *model;
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
57 GtkWidget *tree;
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
58 GHashTable *services;
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
59 };
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
60
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
61 /**
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
62 * Shows a new service discovery dialog.
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
63 */
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
64 PidginDiscoDialog *pidgin_disco_dialog_new(void);
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
65
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
66 /**
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
67 * Destroy all the open dialogs (called when unloading the plugin).
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
68 */
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
69 void pidgin_disco_dialogs_destroy_all(void);
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
70 void pidgin_disco_signed_off_cb(PurpleConnection *pc);
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
71
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
72 void pidgin_disco_add_service(PidginDiscoList *list, XmppDiscoService *service,
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
73 XmppDiscoService *parent);
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
74
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
75 PidginDiscoList *pidgin_disco_list_ref(PidginDiscoList *list);
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
76 void pidgin_disco_list_unref(PidginDiscoList *list);
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
77
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
78 void pidgin_disco_list_set_in_progress(PidginDiscoList *list, gboolean in_progress);
08964b4b2fe4 Convert the disco browser to a plugin. Refs #556
Paul Aurich <paul@darkrain42.org>
parents:
diff changeset
79 #endif /* PIDGIN_XMPP_DISCO_UI_H */