00001 /* 00002 * $Id: http.h,v 1.5 2005/11/09 19:16:53 cbiere Exp $ 00003 * 00004 * Copyright (c) 2003, Raphael Manfredi 00005 * 00006 * Interface definition file. One of the files that defines structures, 00007 * macros, etc. as part of the gui/core interface. 00008 * 00009 *---------------------------------------------------------------------- 00010 * This file is part of gtk-gnutella. 00011 * 00012 * gtk-gnutella is free software; you can redistribute it and/or modify 00013 * it under the terms of the GNU General Public License as published by 00014 * the Free Software Foundation; either version 2 of the License, or 00015 * (at your option) any later version. 00016 * 00017 * gtk-gnutella is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 * GNU General Public License for more details. 00021 * 00022 * You should have received a copy of the GNU General Public License 00023 * along with gtk-gnutella; if not, write to the Free Software 00024 * Foundation, Inc.: 00025 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00026 *---------------------------------------------------------------------- 00027 */ 00028 00029 #ifndef _if_core_http_h_ 00030 #define _if_core_http_h_ 00031 00036 typedef enum http_state { 00037 HTTP_AS_UNKNOWN = 0, 00038 HTTP_AS_CONNECTING, 00039 HTTP_AS_REQ_SENDING, 00040 HTTP_AS_REQ_SENT, 00041 HTTP_AS_HEADERS, 00042 HTTP_AS_RECEIVING, 00043 HTTP_AS_REDIRECTED, 00044 HTTP_AS_REMOVED 00045 } http_state_t; 00046 00051 typedef struct http_range { 00052 filesize_t start; 00053 filesize_t end; 00054 } http_range_t; 00055 00056 #define HTTP_OFFSET_MAX (~((filesize_t) 0U)) 00057 00058 /* 00059 * Public interface, visible from the bridge. 00060 */ 00061 00062 #ifdef CORE_SOURCES 00063 00064 const gchar *http_range_to_string(const GSList *list); 00065 GSList *http_range_merge(GSList *list1, GSList *list2); 00066 00067 #endif /* CORE_SOURCES */ 00068 00069 #endif /* _if_core_http_h_ */ 00070 /* vi: set ts=4 sw=4 cindent: */