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