00001 /* 00002 * Avis Elvin client library for C. 00003 * 00004 * Copyright (C) 2008 Matthew Phillips <avis@mattp.name> 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of version 3 of the GNU Lesser General 00008 * Public License as published by the Free Software Foundation. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00017 */ 00021 #ifndef AVIS_ELVIN_URI_H_ 00022 #define AVIS_ELVIN_URI_H_ 00023 00024 #include <avis/attributes.h> 00025 #include <avis/arrays.h> 00026 #include <avis/stdtypes.h> 00027 #include <avis/errors.h> 00028 #include <avis/defs.h> 00029 00030 AVIS_PUBLIC_DATA 00031 char * _elvin_uri_default_protocol [3]; 00032 00033 #define DEFAULT_URI_PROTOCOL (_elvin_uri_default_protocol) 00034 00041 typedef struct 00042 { 00043 char * host; 00044 uint16_t port; 00045 uint16_t version_major; 00046 uint16_t version_minor; 00047 00052 Attributes * options; 00053 00059 char ** protocol; 00060 } ElvinURI; 00061 00081 AVIS_PUBLIC 00082 bool elvin_uri_from_string (ElvinURI *uri, const char *uri_string, 00083 ElvinError *error); 00084 00088 AVIS_PUBLIC 00089 void elvin_uri_free (ElvinURI *uri); 00090 00091 #endif /*AVIS_ELVIN_URI_H_*/