4 * @file gmyth/gmyth_backend_info.h
6 * @brief <p> This component represents all the MythTV backend server
7 * configuration information.
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>
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.
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.
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
29 #ifndef __GMYTH_BACKEND_INFO_H__
30 #define __GMYTH_BACKEND_INFO_H__
32 #include <glib-object.h>
34 #include "gmyth_uri.h"
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))
50 typedef struct _GMythBackendInfo GMythBackendInfo;
51 typedef struct _GMythBackendInfoClass GMythBackendInfoClass;
53 struct _GMythBackendInfoClass {
54 GObjectClass parent_class;
64 struct _GMythBackendInfo {
66 /** The backend hostname or ip address. */
68 /** The username to connect to the mysql server. */
70 /** The password to connect to the mysql server. */
72 /** The mythtv's mysql database name. */
74 /** The backend port. */
76 /** The backend status port for http connection */
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,
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,
99 void gmyth_backend_info_set_status_port (GMythBackendInfo *backend_info,
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);
110 #endif /* __GMYTH_BACKEND_INFO_H__ */