gmyth/src/gmyth_backendinfo.h
author rosfran
Mon Mar 19 22:00:25 2007 +0000 (2007-03-19)
branchtrunk
changeset 416 f176c8207077
parent 352 d803a518d7ca
child 420 c1601c03cc78
permissions -rw-r--r--
[svn r421] Added libosso library dependencies.
     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     /** The backend hostname or ip address. */
    60     gchar *hostname;
    61     /** The username to connect to the mysql server. */
    62     gchar *username;
    63     /** The password to connect to the mysql server. */
    64     gchar *password;
    65     /** The mythtv's mysql database name. */
    66     gchar *db_name;
    67     /** The backend port. */
    68     gint port;
    69     /** The backend status port for http connection */
    70     gint status_port;
    71     //gchar *path;
    72     
    73     //GMythURI* uri;
    74 };
    75 
    76 
    77 GType               gmyth_backend_info_get_type     (void);
    78 GMythBackendInfo*   gmyth_backend_info_new          (void);
    79 GMythBackendInfo*   gmyth_backend_info_new_full     (const gchar *hostname, 
    80                                                      const gchar *username, 
    81                                                      const gchar *password,
    82                                                      const gchar *db_name, 
    83                                                      gint port);
    84 GMythBackendInfo*   gmyth_backend_info_new_with_uri (const gchar *uri_str);
    85 void                gmyth_backend_info_set_hostname (GMythBackendInfo *backend_info, 
    86                                                      const gchar *hostname);
    87 void                gmyth_backend_info_set_username (GMythBackendInfo *backend_info, 
    88                                                      const gchar *username);
    89 void                gmyth_backend_info_set_password (GMythBackendInfo *backend_info, 
    90                                                      const gchar *password);
    91 void                gmyth_backend_info_set_db_name  (GMythBackendInfo *backend_info, 
    92                                                      const gchar *db_name);
    93 void                gmyth_backend_info_set_port     (GMythBackendInfo *backend_info, 
    94                                                      gint port);
    95 void                gmyth_backend_info_set_status_port (GMythBackendInfo *backend_info,
    96 							gint port);
    97 const gchar*        gmyth_backend_info_get_hostname (GMythBackendInfo *backend_info);
    98 const gchar*        gmyth_backend_info_get_username (GMythBackendInfo *backend_info);
    99 const gchar*        gmyth_backend_info_get_password (GMythBackendInfo *backend_info);
   100 const gchar*        gmyth_backend_info_get_db_name  (GMythBackendInfo *backend_info);
   101 gint                gmyth_backend_info_get_port     (GMythBackendInfo *backend_info);
   102 
   103 GMythURI*           gmyth_backend_info_get_uri	    (GMythBackendInfo *backend_info);
   104 
   105 G_END_DECLS
   106 
   107 #endif /* __GMYTH_BACKEND_INFO_H__ */
   108