gmyth/src/gmyth_backendinfo.h
author renatofilho
Tue Jun 19 22:01:13 2007 +0100 (2007-06-19)
branchtrunk
changeset 755 4b5efa290285
parent 754 cb885ee44618
child 769 1603bc7804da
permissions -rw-r--r--
[svn r761] create function to get recorded inf; fixe some headers indent
     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 \
    38     (gmyth_backend_info_get_type ())
    39 #define GMYTH_BACKEND_INFO(obj) \
    40     (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_BACKEND_INFO_TYPE, GMythBackendInfo))
    41 #define GMYTH_BACKEND_INFO_CLASS(klass) \
    42     (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_BACKEND_INFO_TYPE, GMythBackendInfoClass))
    43 #define IS_GMYTH_BACKEND_INFO(obj) \
    44     (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMYTH_BACKEND_INFO_TYPE))
    45 #define IS_GMYTH_BACKEND_INFO_CLASS(klass) \
    46     (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_BACKEND_INFO_TYPE))
    47 #define GMYTH_BACKEND_INFO_GET_CLASS(obj) \
    48     (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_BACKEND_INFO_TYPE, GMythBackendInfoClass))
    49 
    50 typedef struct _GMythBackendInfo GMythBackendInfo;
    51 typedef struct _GMythBackendInfoClass GMythBackendInfoClass;
    52 
    53 struct _GMythBackendInfoClass {
    54     GObjectClass    parent_class;
    55 
    56     /*
    57      * callbacks 
    58      */
    59     /*
    60      * no one for now 
    61      */
    62 };
    63 
    64 struct _GMythBackendInfo {
    65     GObject         parent;
    66     /** The backend hostname or ip address. */
    67     gchar          *hostname;
    68     /** The username to connect to the mysql server. */
    69     gchar          *username;
    70     /** The password to connect to the mysql server. */
    71     gchar          *password;
    72     /** The mythtv's mysql database name. */
    73     gchar          *db_name;
    74     /** The backend port. */
    75     gint            port;
    76     /** The backend status port for http connection */
    77     gint            status_port;
    78 };
    79 
    80 
    81 GType               gmyth_backend_info_get_type         (void) G_GNUC_CONST;;
    82 GMythBackendInfo*   gmyth_backend_info_new              (void);
    83 GMythBackendInfo*   gmyth_backend_info_new_full         (const gchar        *hostname,
    84                                                          const gchar        *username,
    85                                                          const gchar        *password,
    86                                                          const gchar        *db_name,
    87                                                          gint               port);
    88 GMythBackendInfo*   gmyth_backend_info_new_with_uri     (const gchar        *uri_str);
    89 void                gmyth_backend_info_set_hostname     (GMythBackendInfo   *backend_info,
    90                                                          const gchar        *hostname);
    91 void                gmyth_backend_info_set_username     (GMythBackendInfo   *backend_info,
    92                                                          const gchar        *username);
    93 void                gmyth_backend_info_set_password     (GMythBackendInfo   *backend_info,
    94                                                          const gchar        *password);
    95 void                gmyth_backend_info_set_db_name      (GMythBackendInfo   *backend_info,
    96                                                          const gchar        *db_name);
    97 void                gmyth_backend_info_set_port         (GMythBackendInfo   *backend_info, 
    98                                                          gint               port);
    99 void                gmyth_backend_info_set_status_port  (GMythBackendInfo   *backend_info,
   100                                                          gint               port);
   101 const gchar*        gmyth_backend_info_get_hostname     (GMythBackendInfo   *backend_info);
   102 const gchar*        gmyth_backend_info_get_username     (GMythBackendInfo   *backend_info);
   103 const gchar*        gmyth_backend_info_get_password     (GMythBackendInfo   *backend_info);
   104 const gchar*        gmyth_backend_info_get_db_name      (GMythBackendInfo   *backend_info);
   105 gint                gmyth_backend_info_get_port         (GMythBackendInfo   *backend_info);
   106 GMythURI*           gmyth_backend_info_get_uri          (GMythBackendInfo   *backend_info);
   107 gboolean            gmyth_backend_info_is_local_file    (GMythBackendInfo   *backend_info);
   108 
   109 G_END_DECLS
   110 #endif                          /* __GMYTH_BACKEND_INFO_H__ */