![]() |
C library for SOAP (Simple Object Access Protocol) |
00001 /****************************************************************** 00002 * $Id: nanohttp-url.h,v 1.4 2007/11/03 22:40:15 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 00034 00038 #define URL_ERROR 1100 00039 #define URL_ERROR_UNKNOWN_PROTOCOL (URL_ERROR + 1) 00040 #define URL_ERROR_NO_PROTOCOL (URL_ERROR + 2) 00041 #define URL_ERROR_NO_HOST (URL_ERROR + 3) 00042 00049 typedef enum _hprotocol 00050 { 00051 PROTOCOL_HTTP, 00052 PROTOCOL_HTTPS 00053 } hprotocol_t; 00054 00063 struct hurl_t 00064 { 00065 hprotocol_t protocol; 00069 unsigned short port; 00074 char *host; 00075 char *context; 00076 }; 00077 00078 #ifdef __cplusplus 00079 extern "C" { 00080 #endif 00081 00097 extern herror_t hurl_parse(struct hurl_t * obj, const char *url); 00098 00103 extern void hurl_free(struct hurl_t *url); 00104 00105 #ifdef __cplusplus 00106 } 00107 #endif 00108 00111 #endif
