branches/gmyth-0.1b/src/gmyth_backendinfo.h
author rosfran
Wed Feb 14 21:28:49 2007 +0000 (2007-02-14)
branchtrunk
changeset 360 6d5596b9eb95
permissions -rw-r--r--
[svn r362] Some fixes in the GIOWatcher clean-ups, and changed the API version number.
renatofilho@320
     1
/**
renatofilho@320
     2
 * GMyth Library
renatofilho@320
     3
 *
renatofilho@320
     4
 * @file gmyth/gmyth_backend_info.h
renatofilho@320
     5
 * 
renatofilho@320
     6
 *
renatofilho@320
     7
 * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
renatofilho@320
     8
 * @author Hallyson Melo <hallyson.melo@indt.org.br>
renatofilho@320
     9
 *
renatofilho@320
    10
 *//*
renatofilho@320
    11
 * 
renatofilho@320
    12
 * This program is free software; you can redistribute it and/or modify
renatofilho@320
    13
 * it under the terms of the GNU Lesser General Public License as published by
renatofilho@320
    14
 * the Free Software Foundation; either version 2 of the License, or
renatofilho@320
    15
 * (at your option) any later version.
renatofilho@320
    16
 *
renatofilho@320
    17
 * This program is distributed in the hope that it will be useful,
renatofilho@320
    18
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
renatofilho@320
    19
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
renatofilho@320
    20
 * GNU General Public License for more details.
renatofilho@320
    21
 *
renatofilho@320
    22
 * You should have received a copy of the GNU Lesser General Public License
renatofilho@320
    23
 * along with this program; if not, write to the Free Software
renatofilho@320
    24
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
renatofilho@320
    25
 */
renatofilho@320
    26
renatofilho@320
    27
#ifndef __GMYTH_BACKEND_INFO_H__
renatofilho@320
    28
#define __GMYTH_BACKEND_INFO_H__
renatofilho@320
    29
renatofilho@320
    30
#include <glib-object.h>
renatofilho@320
    31
renatofilho@320
    32
#include "gmyth_uri.h"
renatofilho@320
    33
renatofilho@320
    34
G_BEGIN_DECLS
renatofilho@320
    35
renatofilho@320
    36
#define GMYTH_BACKEND_INFO_TYPE               (gmyth_backend_info_get_type ())
renatofilho@320
    37
#define GMYTH_BACKEND_INFO(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_BACKEND_INFO_TYPE, GMythBackendInfo))
renatofilho@320
    38
#define GMYTH_BACKEND_INFO_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_BACKEND_INFO_TYPE, GMythBackendInfoClass))
renatofilho@320
    39
#define IS_GMYTH_BACKEND_INFO(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_BACKEND_INFO_TYPE))
renatofilho@320
    40
#define IS_GMYTH_BACKEND_INFO_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_BACKEND_INFO_TYPE))
renatofilho@320
    41
#define GMYTH_BACKEND_INFO_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_BACKEND_INFO_TYPE, GMythBackendInfoClass))
renatofilho@320
    42
renatofilho@320
    43
renatofilho@320
    44
typedef struct _GMythBackendInfo         GMythBackendInfo;
renatofilho@320
    45
typedef struct _GMythBackendInfoClass    GMythBackendInfoClass;
renatofilho@320
    46
renatofilho@320
    47
struct _GMythBackendInfoClass
renatofilho@320
    48
{
renatofilho@320
    49
  GObjectClass parent_class;
renatofilho@320
    50
renatofilho@320
    51
  /* callbacks */
renatofilho@320
    52
  /* no one for now */
renatofilho@320
    53
};
renatofilho@320
    54
renatofilho@320
    55
struct _GMythBackendInfo
renatofilho@320
    56
{
renatofilho@320
    57
    GObject parent;
renatofilho@320
    58
renatofilho@320
    59
    gchar *hostname;
renatofilho@320
    60
    gchar *username;
renatofilho@320
    61
    gchar *password;
renatofilho@320
    62
    gchar *db_name;
renatofilho@320
    63
    gint port;
renatofilho@320
    64
    gchar *path;
renatofilho@320
    65
    
renatofilho@320
    66
    GMythURI* uri;
renatofilho@320
    67
};
renatofilho@320
    68
renatofilho@320
    69
renatofilho@320
    70
GType               gmyth_backend_info_get_type     (void);
renatofilho@320
    71
GMythBackendInfo*   gmyth_backend_info_new          (void);
renatofilho@320
    72
GMythBackendInfo*   gmyth_backend_info_new_full     (const gchar *hostname, 
renatofilho@320
    73
                                                     const gchar *username, 
renatofilho@320
    74
                                                     const gchar *password,
renatofilho@320
    75
                                                     const gchar *db_name, 
renatofilho@320
    76
                                                     gint port);
renatofilho@320
    77
GMythBackendInfo*   gmyth_backend_info_new_with_uri (const gchar *uri_str);
renatofilho@320
    78
void                gmyth_backend_info_set_hostname (GMythBackendInfo *backend_info, 
renatofilho@320
    79
                                                     const gchar *hostname);
renatofilho@320
    80
void                gmyth_backend_info_set_username (GMythBackendInfo *backend_info, 
renatofilho@320
    81
                                                     const gchar *username);
renatofilho@320
    82
void                gmyth_backend_info_set_password (GMythBackendInfo *backend_info, 
renatofilho@320
    83
                                                     const gchar *password);
renatofilho@320
    84
void                gmyth_backend_info_set_db_name  (GMythBackendInfo *backend_info, 
renatofilho@320
    85
                                                     const gchar *db_name);
renatofilho@320
    86
void                gmyth_backend_info_set_port     (GMythBackendInfo *backend_info, 
renatofilho@320
    87
                                                     gint port);
renatofilho@320
    88
const gchar*        gmyth_backend_info_get_hostname (GMythBackendInfo *backend_info);
renatofilho@320
    89
const gchar*        gmyth_backend_info_get_username (GMythBackendInfo *backend_info);
renatofilho@320
    90
const gchar*        gmyth_backend_info_get_password (GMythBackendInfo *backend_info);
renatofilho@320
    91
const gchar*        gmyth_backend_info_get_db_name  (GMythBackendInfo *backend_info);
renatofilho@320
    92
gint                gmyth_backend_info_get_port     (GMythBackendInfo *backend_info);
renatofilho@320
    93
renatofilho@320
    94
const GMythURI*			gmyth_backend_info_get_uri			(GMythBackendInfo *backend_info);
renatofilho@320
    95
renatofilho@320
    96
/*const gchar*      gmyth_backend_info_get_full_uri (GMythBackendInfo *backend_info);*/
renatofilho@320
    97
renatofilho@320
    98
G_END_DECLS
renatofilho@320
    99
renatofilho@320
   100
#endif /* __GMYTH_BACKEND_INFO_H__ */
renatofilho@320
   101