Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

serverprovider.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _LIBGDAMM_SERVERPROVIDER_H
00004 #define _LIBGDAMM_SERVERPROVIDER_H
00005 
00006 #include <glibmm.h>
00007 
00008 /* $Id: serverprovider.hg,v 1.5 2004/05/04 09:50:46 murrayc Exp $ */
00009 // -*- C++ -*- // this is for the .hg, I realize gensig puts one in
00010 
00011 /* serverprovider.h
00012  *
00013  * Copyright 2001      Free Software Foundation
00014  *
00015  * This library is free software; you can redistribute it and/or
00016  * modify it under the terms of the GNU Library General Public
00017  * License as published by the Free Software Foundation; either
00018  * version 2 of the License, or (at your option) any later version.
00019  *
00020  * This library is distributed in the hope that it will be useful,
00021  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00022  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00023  * Library General Public License for more details.
00024  *
00025  * You should have received a copy of the GNU Library General Public
00026  * License along with this library; if not, write to the Free
00027  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00028  */
00029 
00030 #include <libgdamm/connection.h>
00031 #include <libgdamm/command.h>
00032 #include <libgda/gda-server-provider.h>
00033 
00034 
00035 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00036 typedef struct _GdaServerProvider GdaServerProvider;
00037 typedef struct _GdaServerProviderClass GdaServerProviderClass;
00038 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00039 
00040 
00041 namespace Gnome
00042 {
00043 
00044 namespace Gda
00045 { class ServerProvider_Class; } // namespace Gda
00046 
00047 } // namespace Gnome
00048 namespace Gnome
00049 {
00050 
00051 namespace Gda
00052 {
00053 
00054 class Connection;
00055 
00056 
00057 class ServerProvider : public Glib::Object
00058 {
00059   
00060 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00061 
00062 public:
00063   typedef ServerProvider CppObjectType;
00064   typedef ServerProvider_Class CppClassType;
00065   typedef GdaServerProvider BaseObjectType;
00066   typedef GdaServerProviderClass BaseClassType;
00067 
00068 private:  friend class ServerProvider_Class;
00069   static CppClassType serverprovider_class_;
00070 
00071 private:
00072   // noncopyable
00073   ServerProvider(const ServerProvider&);
00074   ServerProvider& operator=(const ServerProvider&);
00075 
00076 protected:
00077   explicit ServerProvider(const Glib::ConstructParams& construct_params);
00078   explicit ServerProvider(GdaServerProvider* castitem);
00079 
00080 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00081 
00082 public:
00083   virtual ~ServerProvider();
00084 
00085 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00086   static GType get_type()      G_GNUC_CONST;
00087   static GType get_base_type() G_GNUC_CONST;
00088 #endif
00089 
00091   GdaServerProvider*       gobj()       { return reinterpret_cast<GdaServerProvider*>(gobject_); }
00092 
00094   const GdaServerProvider* gobj() const { return reinterpret_cast<GdaServerProvider*>(gobject_); }
00095 
00097   GdaServerProvider* gobj_copy();
00098 
00099 private:
00100 
00101 
00102   Glib::ustring get_version() const;
00103   
00104   bool open_connection(const Glib::RefPtr<Connection>& cnc, GdaQuarkList *params, const Glib::ustring& username, const Glib::ustring& password);
00105   
00106   bool close_connection(const Glib::RefPtr<Connection>& cnc);
00107 
00108   
00109   Glib::ustring get_server_version(const Glib::RefPtr<Connection>& cnc) const;
00110   
00111   Glib::ustring get_database(const Glib::RefPtr<Connection>& cnc) const;
00112   
00113   bool change_database(const Glib::RefPtr<Connection>& cnc, const Glib::ustring& name);
00114   
00115   bool create_database(const Glib::RefPtr<Connection>& cnc, const Glib::ustring& name);
00116   
00117   bool drop_database(const Glib::RefPtr<Connection>& cnc, const Glib::ustring& name);
00118 
00119    //Use deep ownership because we own both the list and its elements;
00120    
00121 
00122   Glib::ListHandle< Glib::RefPtr<DataModel> > execute_command(const Glib::RefPtr<Connection>& cnc, const Command& cmd, const ParameterList& params);
00123 
00124   
00125   bool begin_transaction(const Glib::RefPtr<Connection>& cnc, const Glib::RefPtr<Transaction>& xaction);
00126   
00127   bool commit_transaction(const Glib::RefPtr<Connection>& cnc, const Glib::RefPtr<Transaction>& xaction);
00128   
00129   bool rollback_transaction(const Glib::RefPtr<Connection>& cnc, const Glib::RefPtr<Transaction>& xaction);
00130 
00131   
00132   bool supports(const Glib::RefPtr<Connection>& cnc, ConnectionFeature feature) const;
00133 
00134   //TODO: Use C++ parameters, and add const version:
00135   
00136   Glib::RefPtr<DataModel> get_schema(const Glib::RefPtr<Connection>& cnc, ConnectionSchema schema, const ParameterList& params);
00137   
00138   Glib::RefPtr<const DataModel> get_schema(const Glib::RefPtr<Connection>& cnc, ConnectionSchema schema, const ParameterList& params) const;
00139 
00140   Glib::RefPtr<DataModel> get_schema(const Glib::RefPtr<Connection>& cnc, ConnectionSchema schema);
00141   Glib::RefPtr<const DataModel> get_schema(const Glib::RefPtr<Connection>& cnc, ConnectionSchema schema) const;
00142 
00143 
00144   bool create_blob(const Glib::RefPtr<Connection>& cnc, GdaBlob *blob);
00145 
00146   
00147   Glib::ustring get_last_insert_id(const Glib::RefPtr<Connection>&, const Glib::RefPtr<DataModel>& recset) const;            
00148 
00149  //TODO: vfuncs.
00150 
00151 
00152 public:
00153 
00154 public:
00155   //C++ methods used to invoke GTK+ virtual functions:
00156 
00157 protected:
00158   //GTK+ Virtual Functions (override these to change behaviour):
00159 
00160   //Default Signal Handlers::
00161 
00162 
00163 };
00164 
00165 } // namespace Gda
00166 } // namespace Gnome
00167 
00168 
00169 namespace Glib
00170 {
00176   Glib::RefPtr<Gnome::Gda::ServerProvider> wrap(GdaServerProvider* object, bool take_copy = false);
00177 }
00178 
00179 
00180 #endif /* _LIBGDAMM_SERVERPROVIDER_H */
00181 

Generated on Fri Jul 29 23:17:13 2005 for libgdamm by  doxygen 1.4.4