nanohttp-url.h

Go to the documentation of this file.
00001 /******************************************************************
00002  *  $Id: nanohttp-url.h,v 1.3 2006/12/11 08:13:19 m0gg Exp $
00003  * 
00004  * CSOAP Project:  A http client/server library in C
00005  * Copyright (C) 2003-2004  Ferhat Ayaz
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Library General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2 of the License, or (at your option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Library General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Library General Public
00018  * License along with this library; if not, write to the
00019  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00020  * Boston, MA  02111-1307, USA.
00021  * 
00022  * Email: ferhatayaz@yahoo.com
00023  ******************************************************************/
00024 #ifndef __nanohttp_url_h
00025 #define __nanohttp_url_h
00026 
00032 #define URL_ERROR                       1100
00033 #define URL_ERROR_UNKNOWN_PROTOCOL      (URL_ERROR + 1)
00034 #define URL_ERROR_NO_PROTOCOL           (URL_ERROR + 2)
00035 #define URL_ERROR_NO_HOST               (URL_ERROR + 3)
00036 
00045 typedef enum _hprotocol
00046 {
00047   PROTOCOL_HTTP,
00048   PROTOCOL_HTTPS
00049 } hprotocol_t;
00050 
00060 struct hurl_t
00061 {
00068   hprotocol_t protocol;
00069 
00078   unsigned short port;
00079 
00085   char *host;
00086 
00092   char *context;
00093 };
00094 
00095 #ifdef __cplusplus
00096 extern "C" {
00097 #endif
00098 
00113 extern herror_t hurl_parse(struct hurl_t * obj, const char *url);
00114 
00122 extern void hurl_free(struct hurl_t *url);
00123 
00124 #ifdef __cplusplus
00125 }
00126 #endif
00127 
00128 #endif

Generated on Thu Jan 25 23:36:03 2007 for csoap by  doxygen 1.4.6