branches/gmyth-0.1b/src/gmyth_backendinfo.h
author renatofilho
Thu Feb 01 18:42:01 2007 +0000 (2007-02-01)
branchtrunk
changeset 320 22a17127789e
permissions -rw-r--r--
[svn r322] created branch gmyth-0.1b
     1 /**
     2  * GMyth Library
     3  *
     4  * @file gmyth/gmyth_backend_info.h
     5  * 
     6  *
     7  * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
     8  * @author Hallyson Melo <hallyson.melo@indt.org.br>
     9  *
    10  *//*
    11  * 
    12  * This program is free software; you can redistribute it and/or modify
    13  * it under the terms of the GNU Lesser General Public License as published by
    14  * the Free Software Foundation; either version 2 of the License, or
    15  * (at your option) any later version.
    16  *
    17  * This program is distributed in the hope that it will be useful,
    18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    20  * GNU General Public License for more details.
    21  *
    22  * You should have received a copy of the GNU Lesser General Public License
    23  * along with this program; if not, write to the Free Software
    24  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    25  */
    26 
    27 #ifndef __GMYTH_BACKEND_INFO_H__
    28 #define __GMYTH_BACKEND_INFO_H__
    29 
    30 #include <glib-object.h>
    31 
    32 #include "gmyth_uri.h"
    33 
    34 G_BEGIN_DECLS
    35 
    36 #define GMYTH_BACKEND_INFO_TYPE               (gmyth_backend_info_get_type ())
    37 #define GMYTH_BACKEND_INFO(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_BACKEND_INFO_TYPE, GMythBackendInfo))
    38 #define GMYTH_BACKEND_INFO_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_BACKEND_INFO_TYPE, GMythBackendInfoClass))
    39 #define IS_GMYTH_BACKEND_INFO(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_BACKEND_INFO_TYPE))
    40 #define IS_GMYTH_BACKEND_INFO_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_BACKEND_INFO_TYPE))
    41 #define GMYTH_BACKEND_INFO_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_BACKEND_INFO_TYPE, GMythBackendInfoClass))
    42 
    43 
    44 typedef struct _GMythBackendInfo         GMythBackendInfo;
    45 typedef struct _GMythBackendInfoClass    GMythBackendInfoClass;
    46 
    47 struct _GMythBackendInfoClass
    48 {
    49   GObjectClass parent_class;
    50 
    51   /* callbacks */
    52   /* no one for now */
    53 };
    54 
    55 struct _GMythBackendInfo
    56 {
    57     GObject parent;
    58 
    59     gchar *hostname;
    60     gchar *username;
    61     gchar *password;
    62     gchar *db_name;
    63     gint port;
    64     gchar *path;
    65     
    66     GMythURI* uri;
    67 };
    68 
    69 
    70 GType               gmyth_backend_info_get_type     (void);
    71 GMythBackendInfo*   gmyth_backend_info_new          (void);
    72 GMythBackendInfo*   gmyth_backend_info_new_full     (const gchar *hostname, 
    73                                                      const gchar *username, 
    74                                                      const gchar *password,
    75                                                      const gchar *db_name, 
    76                                                      gint port);
    77 GMythBackendInfo*   gmyth_backend_info_new_with_uri (const gchar *uri_str);
    78 void                gmyth_backend_info_set_hostname (GMythBackendInfo *backend_info, 
    79                                                      const gchar *hostname);
    80 void                gmyth_backend_info_set_username (GMythBackendInfo *backend_info, 
    81                                                      const gchar *username);
    82 void                gmyth_backend_info_set_password (GMythBackendInfo *backend_info, 
    83                                                      const gchar *password);
    84 void                gmyth_backend_info_set_db_name  (GMythBackendInfo *backend_info, 
    85                                                      const gchar *db_name);
    86 void                gmyth_backend_info_set_port     (GMythBackendInfo *backend_info, 
    87                                                      gint port);
    88 const gchar*        gmyth_backend_info_get_hostname (GMythBackendInfo *backend_info);
    89 const gchar*        gmyth_backend_info_get_username (GMythBackendInfo *backend_info);
    90 const gchar*        gmyth_backend_info_get_password (GMythBackendInfo *backend_info);
    91 const gchar*        gmyth_backend_info_get_db_name  (GMythBackendInfo *backend_info);
    92 gint                gmyth_backend_info_get_port     (GMythBackendInfo *backend_info);
    93 
    94 const GMythURI*			gmyth_backend_info_get_uri			(GMythBackendInfo *backend_info);
    95 
    96 /*const gchar*      gmyth_backend_info_get_full_uri (GMythBackendInfo *backend_info);*/
    97 
    98 G_END_DECLS
    99 
   100 #endif /* __GMYTH_BACKEND_INFO_H__ */
   101