Use conventional style for empty string check
[pidgin-git.git] / pidgin / gtkft.h
blob12f8b380ff8d38023f7be78861fdd1290ed897a9
1 /**
2 * @file gtkft.h GTK+ File Transfer UI
3 * @ingroup pidgin
4 */
6 /* pidgin
8 * Pidgin is the legal property of its developers, whose names are too numerous
9 * to list here. Please refer to the COPYRIGHT file distributed with this
10 * source distribution.
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
26 #ifndef _PIDGINFT_H_
27 #define _PIDGINFT_H_
29 #include "ft.h"
31 /**
32 * A file transfer dialog.
34 * The structure is opaque, as nobody should be touching anything inside of
35 * it.
37 typedef struct _PidginXferDialog PidginXferDialog;
39 /**************************************************************************/
40 /** @name GTK+ File Transfer Dialog API */
41 /**************************************************************************/
42 /*@{*/
44 /**
45 * Creates a new file transfer dialog.
47 * @return The new dialog.
49 PidginXferDialog *pidgin_xfer_dialog_new(void);
51 /**
52 * Destroys a file transfer dialog.
54 * @param dialog The file transfer dialog.
56 void pidgin_xfer_dialog_destroy(PidginXferDialog *dialog);
58 /**
59 * Displays the file transfer dialog given.
60 * If dialog is @c NULL, displays the default dialog, creating one if necessary
62 * @param dialog The file transfer dialog to show.
64 void pidgin_xfer_dialog_show(PidginXferDialog *dialog);
66 /**
67 * Hides the file transfer dialog.
69 * @param dialog The file transfer dialog to hide.
71 void pidgin_xfer_dialog_hide(PidginXferDialog *dialog);
73 /**
74 * Adds a file transfer to the dialog.
76 * @param dialog The file transfer dialog.
77 * @param xfer The file transfer.
79 void pidgin_xfer_dialog_add_xfer(PidginXferDialog *dialog, PurpleXfer *xfer);
81 /**
82 * Removes a file transfer from the dialog.
84 * @param dialog The file transfer dialog.
85 * @param xfer The file transfer.
87 void pidgin_xfer_dialog_remove_xfer(PidginXferDialog *dialog,
88 PurpleXfer *xfer);
90 /**
91 * Indicate in a file transfer dialog that a transfer was cancelled.
93 * @param dialog The file transfer dialog.
94 * @param xfer The file transfer that was cancelled.
96 void pidgin_xfer_dialog_cancel_xfer(PidginXferDialog *dialog,
97 PurpleXfer *xfer);
99 /**
100 * Updates the information for a transfer in the dialog.
102 * @param dialog The file transfer dialog.
103 * @param xfer The file transfer.
105 void pidgin_xfer_dialog_update_xfer(PidginXferDialog *dialog,
106 PurpleXfer *xfer);
108 /*@}*/
110 /**************************************************************************/
111 /** @name GTK+ File Transfer API */
112 /**************************************************************************/
113 /*@{*/
116 * Initializes the GTK+ file transfer system.
118 void pidgin_xfers_init(void);
121 * Uninitializes the GTK+ file transfer system.
123 void pidgin_xfers_uninit(void);
126 * Sets pidgin's main file transfer dialog.
128 * @param dialog The main dialog.
130 void pidgin_set_xfer_dialog(PidginXferDialog *dialog);
133 * Returns pirgin's main file transfer dialog.
135 * @return The main dialog.
137 PidginXferDialog *pidgin_get_xfer_dialog(void);
140 * Returns the UI operations structure for the GTK+ file transfer UI.
142 * @return The GTK+ file transfer UI operations structure.
144 PurpleXferUiOps *pidgin_xfers_get_ui_ops(void);
146 /*@}*/
148 #endif /* _PIDGINFT_H_ */