00001 /* 00002 * $Id: special_upload.h 13343 2007-04-16 20:09:37Z cbiere $ 00003 * 00004 * Copyright (c) 2005, Christian Biere & Raphael Manfredi 00005 * 00006 *---------------------------------------------------------------------- 00007 * This file is part of gtk-gnutella. 00008 * 00009 * gtk-gnutella is free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * gtk-gnutella is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with gtk-gnutella; if not, write to the Free Software 00021 * Foundation, Inc.: 00022 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00023 *---------------------------------------------------------------------- 00024 */ 00025 00038 #ifndef _core_special_upload_h_ 00039 #define _core_special_upload_h_ 00040 00041 #include "common.h" 00042 00043 typedef void (*special_upload_closed_t)(gpointer arg); 00044 typedef void (*special_upload_writable_t)(gpointer arg); 00045 00046 struct special_upload { 00047 struct txdriver *tx; 00048 ssize_t (*read)(struct special_upload *, gpointer dest, size_t size); 00049 ssize_t (*write)(struct special_upload *, gconstpointer data, size_t size); 00050 void (*flush)(struct special_upload *, 00051 special_upload_closed_t cb, gpointer arg); 00052 void (*close)(struct special_upload *, gboolean fully_served); 00053 }; 00054 00055 #endif /* _core_special_upload_h_ */ 00056 00057 /* vi: set ts=4 sw=4 cindent: */
1.3.9.1