diff -r f3cdc7844178 -r c9e53d7250f8 gst-plugins-mythtv/src/gmyth_uri.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gst-plugins-mythtv/src/gmyth_uri.h Mon Oct 23 20:02:26 2006 +0100 @@ -0,0 +1,63 @@ +/** + * + * GMythURI utils + * - Extracts and parses a URI char string, in according with the RFC 2396 + * [http://www.ietf.org/rfc/rfc2396.txt] + * + * @author Rosfran Borges (rosfran.borges@indt.org.br) + * + */ + +#ifndef _GMYTH_URI_H_ +#define _GMYTH_URI_H_ + +#include + +/**************************************** +* Define +****************************************/ + +#define GMYTH_URI_KNKOWN_PORT (-1) +#define GMYTH_URI_DEFAULT_HTTP_PORT 80 +#define GMYTH_URI_DEFAULT_FTP_PORT 21 +#define GMYTH_URI_DEFAULT_PATH "/" +#define GMYTH_URI_MAXLEN 256 + +#define GMYTH_URI_PROTOCOL_DELIM "://" +#define GMYTH_URI_USER_DELIM "@" +#define GMYTH_URI_COLON_DELIM ":" +#define GMYTH_URI_SLASH_DELIM "/" +#define GMYTH_URI_SBLACET_DELIM "[" +#define GMYTH_URI_EBLACET_DELIM "]" +#define GMYTH_URI_SHARP_DELIM "#" +#define GMYTH_URI_QUESTION_DELIM "?" +#define GMYTH_URI_ESCAPING_CHAR "%" + +#define GMYTH_URI_PROTOCOL_MYTH "myth" +#define GMYTH_URI_PROTOCOL_HTTP "http" +#define GMYTH_URI_PROTOCOL_FTP "ftp" + +/**************************************** +* Data Type +****************************************/ + +typedef struct _GMythURI { + GString *uri; + GString *host; + gint port; + GString *protocol; + GString *path; + GString *fragment; + GString *user; + GString *password; + GString *query; +} GMythURI; + +const GMythURI *gmyth_uri_new( gchar *value ); + +#define gmyth_uri_gethost(urip) (urip->host->str) +#define gmyth_uri_getport(urip) (urip->port) +#define gmyth_uri_getprotocol(urip) (urip->protocol->str) +#define gmyth_uri_getpath(urip) (urip->path->str) + +#endif