Replace functions which called once with their bodies
[pidgin-git.git] / pidgin / plugins / disco / gtkdisco.h
blobb27977e9f1cbb47ac0ffb1233f7fddba4e6c4848
1 /* pidgin
3 * Pidgin is the legal property of its developers, whose names are too numerous
4 * to list here. Please refer to the COPYRIGHT file distributed with this
5 * source distribution.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
22 #ifndef PIDGIN_XMPP_DISCO_UI_H
23 #define PIDGIN_XMPP_DISCO_UI_H
25 #include <gtk/gtk.h>
27 typedef struct _PidginDiscoList PidginDiscoList;
29 #include "xmppdisco.h"
31 G_BEGIN_DECLS
33 struct _PidginDiscoDialog {
34 GtkDialog parent;
36 GtkWidget *account_chooser;
38 GtkWidget *progress;
40 GtkWidget *stop_button;
41 GtkWidget *browse_button;
42 GtkWidget *register_button;
43 GtkWidget *add_button;
44 XmppDiscoService *selected;
46 GtkTreeView *tree;
47 GtkTreeStore *model;
48 PurpleAccount *account;
49 PidginDiscoList *discolist;
51 gpointer *prompt_handle;
54 #define PIDGIN_TYPE_DISCO_DIALOG (pidgin_disco_dialog_get_type())
55 G_DECLARE_FINAL_TYPE(PidginDiscoDialog, pidgin_disco_dialog, PIDGIN,
56 DISCO_DIALOG, GtkDialog)
58 struct _PidginDiscoList {
59 PurpleConnection *pc;
60 gboolean in_progress;
61 const gchar *server;
63 gint ref;
64 guint fetch_count;
66 PidginDiscoDialog *dialog;
67 GHashTable *services;
70 /**
71 * Registers dynamic GObjects.
73 void pidgin_disco_dialog_register(PurplePlugin *plugin);
75 /**
76 * Shows a new service discovery dialog.
78 PidginDiscoDialog *pidgin_disco_dialog_new(void);
80 /**
81 * Destroy all the open dialogs (called when unloading the plugin).
83 void pidgin_disco_dialogs_destroy_all(void);
84 void pidgin_disco_signed_off_cb(PurpleConnection *pc);
86 void pidgin_disco_add_service(PidginDiscoList *list, XmppDiscoService *service,
87 XmppDiscoService *parent);
89 PidginDiscoList *pidgin_disco_list_ref(PidginDiscoList *list);
90 void pidgin_disco_list_unref(PidginDiscoList *list);
92 void pidgin_disco_list_set_in_progress(PidginDiscoList *list, gboolean in_progress);
94 G_END_DECLS
96 #endif /* PIDGIN_XMPP_DISCO_UI_H */