browser-eal/include/gwebtransferitem.h

Go to the documentation of this file.
00001 /* ***** BEGIN LICENSE BLOCK *****
00002  * Version: MPL 1.1
00003  *
00004  * The contents of this file are subject to the Mozilla Public License Version
00005  * 1.1 (the "License"); you may not use this file except in compliance with
00006  * the License. You may obtain a copy of the License at
00007  * http://www.mozilla.org/MPL/
00008  *
00009  * Software distributed under the License is distributed on an "AS IS" basis,
00010  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00011  * for the specific language governing rights and limitations under the
00012  * License.
00013  *
00014  * The Original Code is the EAL package.
00015  *
00016  * The Initial Developer of the Original Code is Nokia Corporation.
00017  * Portions created by the Initial Developer are Copyright (C) 2005
00018  * the Initial Developer. All Rights Reserved.
00019  *
00020  * Contact: Leonid Zolotarev <leonid.zolotarev@nokia.com>
00021  *
00022  * ***** END LICENSE BLOCK ***** */
00023 
00024 #include <glib-object.h>
00025 #include "gwebcommon.h"
00026 
00027 #ifndef __GWEBTRANSFERITEM_H__
00028 #define __GWEBTRANSFERITEM_H__
00029 
00030 G_BEGIN_DECLS
00031 
00032 #define G_TYPE_WEB_TRANSFER_ITEM             (g_web_transfer_item_get_type ())
00033 #define G_WEB_TRANSFER_ITEM(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_WEB_TRANSFER_ITEM, GWebTransferItem))
00034 #define G_WEB_TRANSFER_ITEM_CLASS(vtable)    (G_TYPE_CHECK_CLASS_CAST ((vtable), G_TYPE_WEB_TRANSFER_ITEM, GWebTransferItemIface))
00035 #define G_IS_WEB_TRANSFER_ITEM(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_WEB_TRANSFER_ITEM))
00036 #define G_IS_WEB_TRANSFER_ITEM_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), G_TYPE_WEB_TRANSFER_ITEM))
00037 #define G_WEB_TRANSFER_ITEM_GET_CLASS(inst)  (G_TYPE_INSTANCE_GET_INTERFACE ((inst), G_TYPE_WEB_TRANSFER_ITEM, GWebTransferItemIface))
00038 
00039 typedef struct _GWebTransferItem GWebTransferItem; /* dummy object */
00040 typedef struct _GWebTransferItemIface GWebTransferItemIface;
00041 
00045 struct _GWebTransferItemIface {
00046         GTypeInterface parent;
00047 
00048         void (*destroy) (GWebTransferItem *self);
00049         void (*start) (GWebTransferItem *self);
00050         void (*stop) (GWebTransferItem *self);
00051         GWebStatus (*do_continue) (GWebTransferItem *self);
00052         void (*cancel) (GWebTransferItem *self);
00053         void (*reload) (GWebTransferItem *self);
00054         GObject* (*get_web_item) (GWebTransferItem *self);
00055         const gchar* (*get_url) (GWebTransferItem *self);
00056         const gchar* (*get_filename) (GWebTransferItem *self);
00057         glong (*get_total_size) (GWebTransferItem *self);
00058         glong (*get_progress) (GWebTransferItem *self);
00059 };
00060 
00061 GType g_web_transfer_item_get_type (void);
00062 
00066 void g_web_transfer_item_destroy (GWebTransferItem *self);
00067 
00071 void g_web_transfer_item_start (GWebTransferItem *self);
00072 
00076 void g_web_transfer_item_stop (GWebTransferItem *self);
00077 
00082 GWebStatus g_web_transfer_item_continue (GWebTransferItem *self);
00083 
00087 void g_web_transfer_item_cancel (GWebTransferItem *self);
00088 
00092 void g_web_transfer_item_reload (GWebTransferItem *self);
00093 
00098 GObject* g_web_transfer_item_get_web_item (GWebTransferItem *self);
00099 
00104 const gchar* g_web_transfer_item_get_url (GWebTransferItem *self);
00105 
00110 const gchar* g_web_transfer_item_get_filename (GWebTransferItem *self);
00111 
00116 glong g_web_transfer_item_get_total_size (GWebTransferItem *self);
00117 
00122 glong g_web_transfer_item_get_progress (GWebTransferItem *self);
00123 
00131 #define G_WEB_TRANSFER_ITEM_SIGNAL_STARTED "started"
00132 
00136 void g_web_transfer_item_signal_started(GWebTransferItem *item);
00137 
00141 #define G_WEB_TRANSFER_ITEM_SIGNAL_COMPLETED "completed"
00142 
00146 void g_web_transfer_item_signal_completed(GWebTransferItem *item);
00147 
00151 #define G_WEB_TRANSFER_ITEM_SIGNAL_ERROR "error"
00152 
00156 void g_web_transfer_item_signal_error(GWebTransferItem *item);
00157 
00161 #define G_WEB_TRANSFER_ITEM_SIGNAL_PROGRESS "progress"
00162 
00169 void g_web_transfer_item_signal_progress(GWebTransferItem *item,
00170                                                                       gulong downloaded_bytes,
00171                                                                                                                                           gulong total_bytes,
00172                                                                                                                                           gdouble kbps);
00173 
00174 G_END_DECLS
00175 
00176 #endif /* __GWEBTRANSFERITEM_H__ */

Generated on Tue Sep 25 10:37:04 2007 for browser-eal by  doxygen 1.5.1