branches/gmyth-0.1b/src/gmyth_backendinfo.h
branchtrunk
changeset 329 818deb9ae65d
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/branches/gmyth-0.1b/src/gmyth_backendinfo.h	Wed Feb 07 00:03:05 2007 +0000
     1.3 @@ -0,0 +1,101 @@
     1.4 +/**
     1.5 + * GMyth Library
     1.6 + *
     1.7 + * @file gmyth/gmyth_backend_info.h
     1.8 + * 
     1.9 + *
    1.10 + * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
    1.11 + * @author Hallyson Melo <hallyson.melo@indt.org.br>
    1.12 + *
    1.13 + *//*
    1.14 + * 
    1.15 + * This program is free software; you can redistribute it and/or modify
    1.16 + * it under the terms of the GNU Lesser General Public License as published by
    1.17 + * the Free Software Foundation; either version 2 of the License, or
    1.18 + * (at your option) any later version.
    1.19 + *
    1.20 + * This program is distributed in the hope that it will be useful,
    1.21 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.22 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.23 + * GNU General Public License for more details.
    1.24 + *
    1.25 + * You should have received a copy of the GNU Lesser General Public License
    1.26 + * along with this program; if not, write to the Free Software
    1.27 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    1.28 + */
    1.29 +
    1.30 +#ifndef __GMYTH_BACKEND_INFO_H__
    1.31 +#define __GMYTH_BACKEND_INFO_H__
    1.32 +
    1.33 +#include <glib-object.h>
    1.34 +
    1.35 +#include "gmyth_uri.h"
    1.36 +
    1.37 +G_BEGIN_DECLS
    1.38 +
    1.39 +#define GMYTH_BACKEND_INFO_TYPE               (gmyth_backend_info_get_type ())
    1.40 +#define GMYTH_BACKEND_INFO(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_BACKEND_INFO_TYPE, GMythBackendInfo))
    1.41 +#define GMYTH_BACKEND_INFO_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_BACKEND_INFO_TYPE, GMythBackendInfoClass))
    1.42 +#define IS_GMYTH_BACKEND_INFO(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_BACKEND_INFO_TYPE))
    1.43 +#define IS_GMYTH_BACKEND_INFO_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_BACKEND_INFO_TYPE))
    1.44 +#define GMYTH_BACKEND_INFO_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_BACKEND_INFO_TYPE, GMythBackendInfoClass))
    1.45 +
    1.46 +
    1.47 +typedef struct _GMythBackendInfo         GMythBackendInfo;
    1.48 +typedef struct _GMythBackendInfoClass    GMythBackendInfoClass;
    1.49 +
    1.50 +struct _GMythBackendInfoClass
    1.51 +{
    1.52 +  GObjectClass parent_class;
    1.53 +
    1.54 +  /* callbacks */
    1.55 +  /* no one for now */
    1.56 +};
    1.57 +
    1.58 +struct _GMythBackendInfo
    1.59 +{
    1.60 +    GObject parent;
    1.61 +
    1.62 +    gchar *hostname;
    1.63 +    gchar *username;
    1.64 +    gchar *password;
    1.65 +    gchar *db_name;
    1.66 +    gint port;
    1.67 +    gchar *path;
    1.68 +    
    1.69 +    GMythURI* uri;
    1.70 +};
    1.71 +
    1.72 +
    1.73 +GType               gmyth_backend_info_get_type     (void);
    1.74 +GMythBackendInfo*   gmyth_backend_info_new          (void);
    1.75 +GMythBackendInfo*   gmyth_backend_info_new_full     (const gchar *hostname, 
    1.76 +                                                     const gchar *username, 
    1.77 +                                                     const gchar *password,
    1.78 +                                                     const gchar *db_name, 
    1.79 +                                                     gint port);
    1.80 +GMythBackendInfo*   gmyth_backend_info_new_with_uri (const gchar *uri_str);
    1.81 +void                gmyth_backend_info_set_hostname (GMythBackendInfo *backend_info, 
    1.82 +                                                     const gchar *hostname);
    1.83 +void                gmyth_backend_info_set_username (GMythBackendInfo *backend_info, 
    1.84 +                                                     const gchar *username);
    1.85 +void                gmyth_backend_info_set_password (GMythBackendInfo *backend_info, 
    1.86 +                                                     const gchar *password);
    1.87 +void                gmyth_backend_info_set_db_name  (GMythBackendInfo *backend_info, 
    1.88 +                                                     const gchar *db_name);
    1.89 +void                gmyth_backend_info_set_port     (GMythBackendInfo *backend_info, 
    1.90 +                                                     gint port);
    1.91 +const gchar*        gmyth_backend_info_get_hostname (GMythBackendInfo *backend_info);
    1.92 +const gchar*        gmyth_backend_info_get_username (GMythBackendInfo *backend_info);
    1.93 +const gchar*        gmyth_backend_info_get_password (GMythBackendInfo *backend_info);
    1.94 +const gchar*        gmyth_backend_info_get_db_name  (GMythBackendInfo *backend_info);
    1.95 +gint                gmyth_backend_info_get_port     (GMythBackendInfo *backend_info);
    1.96 +
    1.97 +const GMythURI*			gmyth_backend_info_get_uri			(GMythBackendInfo *backend_info);
    1.98 +
    1.99 +/*const gchar*      gmyth_backend_info_get_full_uri (GMythBackendInfo *backend_info);*/
   1.100 +
   1.101 +G_END_DECLS
   1.102 +
   1.103 +#endif /* __GMYTH_BACKEND_INFO_H__ */
   1.104 +