diff -r 000000000000 -r 60bfeabc0af6 branches/gmyth-0.1b/src/gmyth_backendinfo.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/branches/gmyth-0.1b/src/gmyth_backendinfo.h Thu Feb 08 20:57:31 2007 +0000 @@ -0,0 +1,101 @@ +/** + * GMyth Library + * + * @file gmyth/gmyth_backend_info.h + * + * + * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia. + * @author Hallyson Melo + * + *//* + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __GMYTH_BACKEND_INFO_H__ +#define __GMYTH_BACKEND_INFO_H__ + +#include + +#include "gmyth_uri.h" + +G_BEGIN_DECLS + +#define GMYTH_BACKEND_INFO_TYPE (gmyth_backend_info_get_type ()) +#define GMYTH_BACKEND_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_BACKEND_INFO_TYPE, GMythBackendInfo)) +#define GMYTH_BACKEND_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_BACKEND_INFO_TYPE, GMythBackendInfoClass)) +#define IS_GMYTH_BACKEND_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_BACKEND_INFO_TYPE)) +#define IS_GMYTH_BACKEND_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_BACKEND_INFO_TYPE)) +#define GMYTH_BACKEND_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_BACKEND_INFO_TYPE, GMythBackendInfoClass)) + + +typedef struct _GMythBackendInfo GMythBackendInfo; +typedef struct _GMythBackendInfoClass GMythBackendInfoClass; + +struct _GMythBackendInfoClass +{ + GObjectClass parent_class; + + /* callbacks */ + /* no one for now */ +}; + +struct _GMythBackendInfo +{ + GObject parent; + + gchar *hostname; + gchar *username; + gchar *password; + gchar *db_name; + gint port; + gchar *path; + + GMythURI* uri; +}; + + +GType gmyth_backend_info_get_type (void); +GMythBackendInfo* gmyth_backend_info_new (void); +GMythBackendInfo* gmyth_backend_info_new_full (const gchar *hostname, + const gchar *username, + const gchar *password, + const gchar *db_name, + gint port); +GMythBackendInfo* gmyth_backend_info_new_with_uri (const gchar *uri_str); +void gmyth_backend_info_set_hostname (GMythBackendInfo *backend_info, + const gchar *hostname); +void gmyth_backend_info_set_username (GMythBackendInfo *backend_info, + const gchar *username); +void gmyth_backend_info_set_password (GMythBackendInfo *backend_info, + const gchar *password); +void gmyth_backend_info_set_db_name (GMythBackendInfo *backend_info, + const gchar *db_name); +void gmyth_backend_info_set_port (GMythBackendInfo *backend_info, + gint port); +const gchar* gmyth_backend_info_get_hostname (GMythBackendInfo *backend_info); +const gchar* gmyth_backend_info_get_username (GMythBackendInfo *backend_info); +const gchar* gmyth_backend_info_get_password (GMythBackendInfo *backend_info); +const gchar* gmyth_backend_info_get_db_name (GMythBackendInfo *backend_info); +gint gmyth_backend_info_get_port (GMythBackendInfo *backend_info); + +const GMythURI* gmyth_backend_info_get_uri (GMythBackendInfo *backend_info); + +/*const gchar* gmyth_backend_info_get_full_uri (GMythBackendInfo *backend_info);*/ + +G_END_DECLS + +#endif /* __GMYTH_BACKEND_INFO_H__ */ +