gmyth/src/gmyth_uri.h
branchtrunk
changeset 925 4a8d56080089
parent 924 c39c60fcfec8
child 926 84b9b65e511f
     1.1 --- a/gmyth/src/gmyth_uri.h	Mon Feb 25 17:45:36 2008 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,101 +0,0 @@
     1.4 -/**
     1.5 - * GMyth Library
     1.6 - *
     1.7 - * @file gmyth/gmyth_uri.h
     1.8 - * 
     1.9 - * @brief <p> GMythURI utils
    1.10 - *  - Extracts and parses a URI char string, in according with the RFC 2396 
    1.11 - *    [http://www.ietf.org/rfc/rfc2396.txt]
    1.12 - * 
    1.13 - * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
    1.14 - * @author Rosfran Borges <rosfran.borges@indt.org.br>
    1.15 - *
    1.16 - * 
    1.17 - * This program is free software; you can redistribute it and/or modify
    1.18 - * it under the terms of the GNU Lesser General Public License as published by
    1.19 - * the Free Software Foundation; either version 2 of the License, or
    1.20 - * (at your option) any later version.
    1.21 - *
    1.22 - * This program is distributed in the hope that it will be useful,
    1.23 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.24 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.25 - * GNU General Public License for more details.
    1.26 - *
    1.27 - * You should have received a copy of the GNU Lesser General Public License
    1.28 - * along with this program; if not, write to the Free Software
    1.29 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    1.30 - */
    1.31 -
    1.32 -#ifndef _GMYTH_URI_H_
    1.33 -#define _GMYTH_URI_H_
    1.34 -
    1.35 -#include <glib.h>
    1.36 -#include <glib-object.h>
    1.37 -
    1.38 -#include <stdlib.h>
    1.39 -#include <stdio.h>
    1.40 -#include <string.h>
    1.41 -
    1.42 -G_BEGIN_DECLS
    1.43 -#define GMYTH_URI_TYPE               (gmyth_uri_get_type ())
    1.44 -#define GMYTH_URI(obj)          		 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_URI_TYPE, GMythURI))
    1.45 -#define GMYTH_URI_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_URI_TYPE, GMythURIClass))
    1.46 -#define IS_GMYTH_URI(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMYTH_URI_TYPE))
    1.47 -#define IS_GMYTH_URI_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_URI_TYPE))
    1.48 -#define GMYTH_URI_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_URI_TYPE, GMythURIClass))
    1.49 -typedef struct _GMythURI GMythURI;
    1.50 -typedef struct _GMythURIClass GMythURIClass;
    1.51 -
    1.52 -
    1.53 -    /****************************************
    1.54 -	 * Data Type
    1.55 -	 ****************************************/
    1.56 -
    1.57 -struct _GMythURIClass {
    1.58 -    GObjectClass    parent_class;
    1.59 -
    1.60 -    /*
    1.61 -     * callbacks 
    1.62 -     */
    1.63 -    /*
    1.64 -     * no one for now 
    1.65 -     */
    1.66 -};
    1.67 -
    1.68 -struct _GMythURI {
    1.69 -
    1.70 -    GObject         parent;
    1.71 -
    1.72 -    GString        *uri;
    1.73 -    GString        *host;
    1.74 -    gint            port;
    1.75 -    GString        *protocol;
    1.76 -    GString        *path;
    1.77 -    GString        *fragment;
    1.78 -    GString        *user;
    1.79 -    GString        *password;
    1.80 -    GString        *query;
    1.81 -
    1.82 -};
    1.83 -
    1.84 -GType           gmyth_uri_get_type(void);
    1.85 -GMythURI       *gmyth_uri_new(void);
    1.86 -GMythURI       *gmyth_uri_new_with_value(const gchar * value);
    1.87 -gboolean        gmyth_uri_is_equals(GMythURI * uri1, GMythURI * uri2);
    1.88 -gboolean        gmyth_uri_is_livetv(GMythURI * uri);
    1.89 -gint            gmyth_uri_get_channel_num(GMythURI * uri);
    1.90 -gchar          *gmyth_uri_get_channel_name(GMythURI * uri);
    1.91 -char           *gmyth_uri_to_string(const GMythURI * uri);
    1.92 -gboolean        gmyth_uri_is_local_file(const GMythURI * uri);
    1.93 -
    1.94 -#define 	gmyth_uri_get_host(urip) 			( urip->host != NULL ? urip->host->str : "" )
    1.95 -#define 	gmyth_uri_get_port(urip) 			( urip->port )
    1.96 -#define 	gmyth_uri_get_protocol(urip) 	( urip->protocol != NULL ? urip->protocol->str : "" )
    1.97 -#define 	gmyth_uri_get_path(urip) 			( urip->path != NULL ? urip->path->str : "" )
    1.98 -#define 	gmyth_uri_get_user(urip) 			( urip->user != NULL ? urip->user->str : "" )
    1.99 -#define    	gmyth_uri_get_password(urip) 	( urip->password != NULL ? urip->password->str : "" )
   1.100 -#define 	gmyth_uri_get_fragment(urip) 	( urip->fragment != NULL ? urip->fragment->str : "" )
   1.101 -#define 	gmyth_uri_get_query(urip) 		( urip->query != NULL ? urip->query->str : "" )
   1.102 -
   1.103 -G_END_DECLS
   1.104 -#endif                          /* _GMYTH_URI_H_ */