Nemiver  0.3
nmv-i-connection-manager-driver.h
Go to the documentation of this file.
1 /* -*- Mode: C++; indent-tabs-mode:nil; c-basic-offset:4; -*- */
2 
3 /*
4  *This file is part of the Nemiver Project.
5  *
6  *Nemiver is free software; you can redistribute
7  *it and/or modify it under the terms of
8  *the GNU General Public License as published by the
9  *Free Software Foundation; either version 2,
10  *or (at your option) any later version.
11  *
12  *Nemiver is distributed in the hope that it will
13  *be useful, but WITHOUT ANY WARRANTY;
14  *without even the implied warranty of
15  *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  *See the GNU General Public License for more details.
17  *
18  *You should have received a copy of the
19  *GNU General Public License along with Nemiver;
20  *see the file COPYING.
21  *If not, write to the Free Software Foundation,
22  *Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23  *
24  *See COPYRIGHT file copyright information.
25  */
26 #ifndef __NMV_I_CONNECTION_MANAGER_DRIVER_H__
27 #define __NMV_I_CONNECTION_MANAGER_DRIVER_H__
28 
29 #include "nmv-ustring.h"
30 #include "nmv-dynamic-module.h"
31 #include "nmv-safe-ptr-utils.h"
33 
34 namespace nemiver {
35 namespace common {
36 
37 class IConnectionManagerDriver;
38 
39 class DBDesc {
40  common::UString m_type;
41  common::UString m_host;
42  unsigned long m_port;
43  common::UString m_name;
44 
45 public:
46  DBDesc ()
47  {}
48  DBDesc (const common::UString &a_host,
49  const unsigned long &a_port,
50  const common::UString &a_db_name);
51 
52  const common::UString host () const
53  {
54  return m_host;
55  };
56  unsigned long port () const
57  {
58  return m_port;
59  };
60  const common::UString name () const
61  {
62  return m_name;
63  };
64  const common::UString type () const
65  {
66  return m_type;
67  };
68 
69  void set_host (const common::UString &a_host)
70  {
71  m_host = a_host;
72  };
73  void set_port (const unsigned long &a_port)
74  {
75  m_port = a_port;
76  };
77  void set_name (const common::UString &a_name)
78  {
79  m_name = a_name;
80  };
81  void set_type (const common::UString &a_type)
82  {
83  m_type = a_type;
84  };
85 };//end class DBDesc
86 
88  public common::DynModIface {
89 public:
91  common::DynModIface (a_dynmod)
92  {
93  }
94 
96  virtual IConnectionDriverSafePtr connect_to_db
97  (const DBDesc &a_db_desc,
98  const common::UString &a_user,
99  const common::UString &a_pass) = 0;
100 };//end class IConnectionManagerDriver
101 
105 };//end namespace common
106 };//end namespace nemiver
107 #endif //__NMV_I_CONNECTION_MANAGER_DRIVER_H__
108 
nmv-safe-ptr-utils.h
nemiver::common::DBDesc::set_name
void set_name(const common::UString &a_name)
Definition: nmv-i-connection-manager-driver.h:77
nemiver::common::DBDesc::host
const common::UString host() const
Definition: nmv-i-connection-manager-driver.h:52
nemiver
Definition: nmv-address.h:31
nemiver::common::ObjectRef
Definition: nmv-safe-ptr-utils.h:45
nemiver::common::DBDesc::set_port
void set_port(const unsigned long &a_port)
Definition: nmv-i-connection-manager-driver.h:73
nmv-ustring.h
nemiver::common::DynamicModule
The base class for loadable modules.
Definition: nmv-dynamic-module.h:76
nemiver::common::DBDesc::DBDesc
DBDesc()
Definition: nmv-i-connection-manager-driver.h:46
nemiver::common::IConnectionManagerDriver
Definition: nmv-i-connection-manager-driver.h:87
nmv-i-connection-driver.h
nemiver::common::UString
Definition: nmv-ustring.h:45
nemiver::common::DBDesc::port
unsigned long port() const
Definition: nmv-i-connection-manager-driver.h:56
nemiver::common::DynModIface
Definition: nmv-dynamic-module.h:220
nemiver::common::IConnectionManagerDriver::IConnectionManagerDriver
IConnectionManagerDriver(DynamicModule *a_dynmod)
Definition: nmv-i-connection-manager-driver.h:90
nemiver::common::DBDesc
Definition: nmv-i-connection-manager-driver.h:39
nmv-dynamic-module.h
nemiver::common::IConnectionManagerDriver::~IConnectionManagerDriver
virtual ~IConnectionManagerDriver()
Definition: nmv-i-connection-manager-driver.h:95
NEMIVER_PURE_IFACE
#define NEMIVER_PURE_IFACE
Definition: nmv-api-macros.h:52
nemiver::common::DBDesc::set_type
void set_type(const common::UString &a_type)
Definition: nmv-i-connection-manager-driver.h:81
nemiver::common::DBDesc::name
const common::UString name() const
Definition: nmv-i-connection-manager-driver.h:60
nemiver::common::DBDesc::type
const common::UString type() const
Definition: nmv-i-connection-manager-driver.h:64
nemiver::common::DBDesc::set_host
void set_host(const common::UString &a_host)
Definition: nmv-i-connection-manager-driver.h:69
nemiver::common::ObjectUnref
Definition: nmv-safe-ptr-utils.h:55
nemiver::common::SafePtr
Definition: nmv-safe-ptr.h:71
common
Definition: nmv-proc-list-dialog.h:32
nemiver::common::IConnectionManagerDriverSafePtr
common::SafePtr< IConnectionManagerDriver, common::ObjectRef, common::ObjectUnref > IConnectionManagerDriverSafePtr
Definition: nmv-i-connection-manager-driver.h:104