gnomemm r1785 - in libgdamm/trunk: . examples/simple libgda libgda/src



Author: jhs
Date: Thu Nov 13 09:58:06 2008
New Revision: 1785
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1785&view=rev

Log:
2008-11-13  Johannes Schmid  <jhs gnome org>

	* libgda/libgdamm.h:
	Add missing files
	* libgda/src/config.ccg:
	* libgda/src/config.hg:
	* libgda/src/connection.hg:
	* libgda/src/metastore.hg:
	* libgda/src/metastruct.hg:
	* libgda/src/set.hg:
	* libgda/src/sqlparser.hg:
	Disabled some methods that cause problems and may not be of any use.
	Fixed some build errors and sileced a warning

Modified:
   libgdamm/trunk/ChangeLog
   libgdamm/trunk/examples/simple/main.cc
   libgdamm/trunk/libgda/libgdamm.h
   libgdamm/trunk/libgda/src/config.ccg
   libgdamm/trunk/libgda/src/config.hg
   libgdamm/trunk/libgda/src/connection.hg
   libgdamm/trunk/libgda/src/metastore.hg
   libgdamm/trunk/libgda/src/metastruct.hg
   libgdamm/trunk/libgda/src/set.hg
   libgdamm/trunk/libgda/src/sqlparser.hg

Modified: libgdamm/trunk/examples/simple/main.cc
==============================================================================
--- libgdamm/trunk/examples/simple/main.cc	(original)
+++ libgdamm/trunk/examples/simple/main.cc	Thu Nov 13 09:58:06 2008
@@ -20,10 +20,9 @@
 
 
 #include <libgdamm.h>
+#include <libgdamm/config.h>
 #include <iostream>
 
-#include <sql-parser/gda-sql-parser.h>
-
 using namespace Gnome;
 
 /*

Modified: libgdamm/trunk/libgda/libgdamm.h
==============================================================================
--- libgdamm/trunk/libgda/libgdamm.h	(original)
+++ libgdamm/trunk/libgda/libgdamm.h	Thu Nov 13 09:58:06 2008
@@ -34,26 +34,33 @@
 
 #include <libgdamm/init.h>
 #include <libgdamm/batch.h>
+#include <libgdamm/blobop.h>
 #include <libgdamm/column.h>
 #include <libgdamm/config.h>
 #include <libgdamm/connection.h>
 #include <libgdamm/connectionevent.h>
+#include <libgdamm/dataaccesswrapper.h>
+#include <libgdamm/datacomparator.h>
 #include <libgdamm/datahandler.h>
 #include <libgdamm/datamodel.h>
 #include <libgdamm/datamodelarray.h>
 #include <libgdamm/datamodelimport.h>
 #include <libgdamm/datamodeliter.h>
 #include <libgdamm/dataproxy.h>
+#include <libgdamm/dataselect.h>
 #include <libgdamm/error.h>
 #include <libgdamm/holder.h>
 #include <libgdamm/metastore.h>
 #include <libgdamm/metastruct.h>
+#include <libgdamm/quarklist.h>
 #include <libgdamm/row.h>
 #include <libgdamm/serveroperation.h>
 #include <libgdamm/serverprovider.h>
 #include <libgdamm/set.h>
 #include <libgdamm/sqlparser.h>
 #include <libgdamm/statement.h>
+#include <libgdamm/threader.h>
 #include <libgdamm/transactionstatus.h>
+#include <libgdamm/xatransaction.h>
 
 #endif /* #ifndef LIBGDAMM_H */

Modified: libgdamm/trunk/libgda/src/config.ccg
==============================================================================
--- libgdamm/trunk/libgda/src/config.ccg	(original)
+++ libgdamm/trunk/libgda/src/config.ccg	Thu Nov 13 09:58:06 2008
@@ -28,7 +28,7 @@
 namespace Gda
 {
 
-DsnInfo* Config::get_dsn_info (const Glib::ustring& dsn_name)
+GdaDsnInfo* Config::get_dsn_info (const Glib::ustring& dsn_name)
 {
   return gda_config_get_dsn_info (dsn_name.c_str()); 
 }

Modified: libgdamm/trunk/libgda/src/config.hg
==============================================================================
--- libgdamm/trunk/libgda/src/config.hg	(original)
+++ libgdamm/trunk/libgda/src/config.hg	Thu Nov 13 09:58:06 2008
@@ -32,8 +32,6 @@
 
 namespace Gda
 {
-#m4 _EQUAL(GdaDsnInfo*, DsnInfo*)
-typedef GdaDsnInfo DsnInfo;
   
 /** Configuration â Access/Management of libgda configuration
  *
@@ -47,8 +45,8 @@
 public:
   _WRAP_METHOD(static Glib::RefPtr<Config> get(), gda_config_get, refreturn)
   
-  _WRAP_METHOD_DOCS_ONLY(gda_config_get_dsn_info);
-  static DsnInfo* get_dsn_info (const Glib::ustring& dsn_name);
+  _WRAP_METHOD_DOCS_ONLY(gda_config_get_dsn_info)
+  static GdaDsnInfo* get_dsn_info (const Glib::ustring& dsn_name);
     
   _WRAP_METHOD_DOCS_ONLY(gda_config_dsn_needs_authentication)
   static bool dsn_needs_authentication(const Glib::ustring& dsn_name);
@@ -61,12 +59,11 @@
   _WRAP_METHOD_DOCS_ONLY(gda_config_can_modify_system_config)
   static bool can_modify_system_config();
   
-  #m4 _CONVERSION(`gpointer',`DsnInfo*',`(DsnInfo*)($3)')
-  _WRAP_SIGNAL(void dsn_added(DsnInfo* info), "dsn-added", no_default_handler)
-  _WRAP_SIGNAL(void dsn_changed(DsnInfo* info), "dsn-changed", no_default_handler)
-  _WRAP_SIGNAL(void dsn_removed(DsnInfo* info), "dsn-removed", no_default_handler)
-  _WRAP_SIGNAL(void dsn_to_be_removed(DsnInfo* info), "dsn-to-be-removed", no_default_handler)
-    
+  #m4 _CONVERSION(`gpointer',`GdaDsnInfo*',`(GdaDsnInfo*)($3)')
+  _WRAP_SIGNAL(void dsn_added(GdaDsnInfo* info), "dsn-added", no_default_handler)
+  _WRAP_SIGNAL(void dsn_changed(GdaDsnInfo* info), "dsn-changed", no_default_handler)
+  _WRAP_SIGNAL(void dsn_removed(GdaDsnInfo* info), "dsn-removed", no_default_handler)
+  _WRAP_SIGNAL(void dsn_to_be_removed(GdaDsnInfo* info), "dsn-to-be-removed", no_default_handler)
   _WRAP_PROPERTY("system-filename", Glib::ustring);
   _WRAP_PROPERTY("user-filename", Glib::ustring);
 };

Modified: libgdamm/trunk/libgda/src/connection.hg
==============================================================================
--- libgdamm/trunk/libgda/src/connection.hg	(original)
+++ libgdamm/trunk/libgda/src/connection.hg	Thu Nov 13 09:58:06 2008
@@ -28,8 +28,6 @@
 #include <libgdamm/serveroperation.h>
 #include <libgdamm/value.h>
 
-#include <libgda/gda-meta-store.h>
-
 _DEFS(libgdamm,libgda)
 _PINCLUDE(glibmm/private/object_p.h)
 
@@ -165,7 +163,8 @@
   _WRAP_METHOD(Glib::RefPtr<SqlParser> create_parser(), gda_connection_create_parser)
 
   _WRAP_METHOD(Glib::ustring get_provider_name() const, gda_connection_get_provider_name)
-  _WRAP_METHOD(bool update_meta_store (GdaMetaContext* context), gda_connection_update_meta_store, errthrow)
+  _IGNORE(gda_connection_update_meta_store)
+  //_WRAP_METHOD(bool update_meta_store (MetaContext* context), gda_connection_update_meta_store, errthrow)
   
   _WRAP_METHOD(bool statement_prepare (const Glib::RefPtr<Statement>& stmt), gda_connection_statement_prepare, errthrow)
 

Modified: libgdamm/trunk/libgda/src/metastore.hg
==============================================================================
--- libgdamm/trunk/libgda/src/metastore.hg	(original)
+++ libgdamm/trunk/libgda/src/metastore.hg	Thu Nov 13 09:58:06 2008
@@ -31,8 +31,6 @@
 namespace Gda
 {
 
-typedef GdaMetaContext MetaContext;
-
 /** Dictionary object
  *
  * Previous versions of Libgda relied on an XML based file to store dictionary 
@@ -63,8 +61,9 @@
   
   _WRAP_METHOD(int get_version(), gda_meta_store_get_version)
   //TODO: varargs: extract(), modify()
-
-  _WRAP_METHOD(bool modify_with_context (MetaContext* context, const Glib::RefPtr<DataModel>& new_data), gda_meta_store_modify_with_context, errthrow)
+  
+  _IGNORE (gda_meta_store_modify_with_context)
+  //_WRAP_METHOD(bool modify_with_context (MetaContext* context, const Glib::RefPtr<DataModel>& new_data), gda_meta_store_modify_with_context, errthrow)
   _WRAP_METHOD(Glib::RefPtr<DataModel> create_modify_data_model(const Glib::ustring& table_name), gda_meta_store_create_modify_data_model)
   _WRAP_METHOD(Glib::RefPtr<MetaStruct> schema_get_structure(), gda_meta_store_schema_get_structure, errthrow)
   _WRAP_METHOD(Glib::SListHandle<Glib::ustring> schema_get_all_tables(), gda_meta_store_schema_get_all_tables)
@@ -86,8 +85,9 @@
   _WRAP_PROPERTY("cnc", Glib::RefPtr<Connection>)  
 
   _WRAP_SIGNAL(void meta_reset(), "meta-reset")
-   #m4 _CONVERSION(`gpointer',`MetaContext*',`(MetaContext*)($3)')
-  _WRAP_SIGNAL(gpointer suggest_update(MetaContext*  suggest), "suggest-update", no_default_handler)
+  // TODO: do we need this?
+  //#m4 _CONVERSION(`gpointer',`MetaContext*',`(MetaContext*)($3)')
+  //_WRAP_SIGNAL(gpointer suggest_update(MetaContext*  suggest), "suggest-update", no_default_handler)
   // Listhandle...
   // _WRAP_SIGNAL(void meta_changed(Glib::SListHandle<>))
 };

Modified: libgdamm/trunk/libgda/src/metastruct.hg
==============================================================================
--- libgdamm/trunk/libgda/src/metastruct.hg	(original)
+++ libgdamm/trunk/libgda/src/metastruct.hg	Thu Nov 13 09:58:06 2008
@@ -33,11 +33,7 @@
 _WRAP_ENUM(MetaStructFeature, GdaMetaStructFeature)
 _WRAP_ENUM(MetaDbObjectType, GdaMetaDbObjectType)
 _WRAP_ENUM(MetaSortType, GdaMetaSortType)
-_WRAP_ENUM(MetaGraphInfo, GdaMetaGraphInfo)
-
-typedef GdaMetaDbObject MetaDbObject;
-typedef GdaMetaTable MetaTable;
-typedef GdaMetaTableColumn MetaTableColumn;
+_WRAP_ENUM(MetaGraphInfo, GdaMetaGraphInfo) 
 
 class MetaStore;
 
@@ -69,14 +65,14 @@
 public:
   _WRAP_CREATE(const Glib::RefPtr<MetaStore>& store, MetaStructFeature features)
   
-  _WRAP_METHOD(MetaDbObject* complement (MetaDbObjectType type, const Glib::ValueBase& catalog, const Glib::ValueBase& schema, const Glib::ValueBase& name), gda_meta_struct_complement, errthrow)
+  _WRAP_METHOD(GdaMetaDbObject* complement (MetaDbObjectType type, const Glib::ValueBase& catalog, const Glib::ValueBase& schema, const Glib::ValueBase& name), gda_meta_struct_complement, errthrow)
   _WRAP_METHOD(bool complement_schema (const Glib::ValueBase& catalog, const Glib::ValueBase& schema), gda_meta_struct_complement_schema, errthrow)
   _WRAP_METHOD(bool complement_default (), gda_meta_struct_complement_default, errthrow)
   _IGNORE(gda_meta_struct_complement_depend) // private API   
 
   _WRAP_METHOD(bool sort_db_object (MetaSortType sort_type), gda_meta_struct_sort_db_objects, errthrow)
-  _WRAP_METHOD(MetaDbObject* get_db_object(const Glib::ValueBase& catalog, const Glib::ValueBase& schema, const Glib::ValueBase& name), gda_meta_struct_get_db_object)
-  _WRAP_METHOD(MetaTableColumn* get_table_column(MetaTable* table, const Glib::ValueBase& col_name), gda_meta_struct_get_table_column)
+    _WRAP_METHOD(GdaMetaDbObject* get_db_object(const Glib::ValueBase& catalog, const Glib::ValueBase& schema, const Glib::ValueBase& name), gda_meta_struct_get_db_object)
+  _WRAP_METHOD(GdaMetaTableColumn* get_table_column(GdaMetaTable* table, const Glib::ValueBase& col_name), gda_meta_struct_get_table_column)
   _WRAP_METHOD(Glib::ustring dump_as_graph(MetaGraphInfo info), gda_meta_struct_dump_as_graph, errthrow)
   
   // FIXME: Use C++ type

Modified: libgdamm/trunk/libgda/src/set.hg
==============================================================================
--- libgdamm/trunk/libgda/src/set.hg	(original)
+++ libgdamm/trunk/libgda/src/set.hg	Thu Nov 13 09:58:06 2008
@@ -34,9 +34,6 @@
 {
 
 typedef Glib::SListHandle<Holder> HolderSList;
-typedef GdaSetSource SetSource;
-typedef GdaSetGroup SetGroup;
-typedef GdaSetNode SetNode;
 
 /** Container for several values
  *
@@ -71,12 +68,15 @@
   _WRAP_METHOD(void merge_with_set (const Glib::RefPtr<Set>& set_to_merge), gda_set_merge_with_set)
   
   _WRAP_METHOD(bool is_valid() const, gda_set_is_valid, errthrow)
-
+  
+  /* these don't seem to be very useful */
+  _IGNORE(gda_set_get_source_model, gda_set_get_source, gda_source_get_group, gda_source_get_node)
+/*
   _WRAP_METHOD(SetSource* get_source_for_model (const Glib::RefPtr<DataModel>& model), gda_set_get_source_for_model)
   _WRAP_METHOD(SetSource* get_source (const Glib::RefPtr<Holder>& holder), gda_set_get_source)
   _WRAP_METHOD(SetGroup* get_group (const Glib::RefPtr<Holder>& holder), gda_set_get_group)
   _WRAP_METHOD(SetNode* get_node (const Glib::RefPtr<Holder>& holder), gda_set_get_node)
-		
+*/		
   _WRAP_SIGNAL(void holder_changed (const Glib::RefPtr<Holder>& holder), "holder-changed")
   _WRAP_SIGNAL(void public_data_changed (), "public-data-changed")
   _WRAP_SIGNAL(Error validate_set(), "validate-set", no_default_handler)

Modified: libgdamm/trunk/libgda/src/sqlparser.hg
==============================================================================
--- libgdamm/trunk/libgda/src/sqlparser.hg	(original)
+++ libgdamm/trunk/libgda/src/sqlparser.hg	Thu Nov 13 09:58:06 2008
@@ -33,6 +33,10 @@
 
 _WRAP_ENUM(SqlParserMode, GdaSqlParserMode)
 
+// This is a hack to avoid a stupid gcc warning for a correctly escaped comment
+#if defined __GNUC__
+#pragma GCC system_header
+#endif
 /** SQL parser
  *
  * The Gda::SqlParser is an object dedicated to creating Gda::Statement and 
@@ -76,13 +80,13 @@
  * - ##NAME[::TYPE[::NULL]]: for a variable named NAME with the optional type TYPE 
  * (which can be a GType name or a custom database type name), and with the 
  * optional "::NULL" to instruct that the variable can be NULL.
- * - ## \/* name:NAME [type:TYPE] [nullok:[TRUE|FALSE]] [descr:DESCR] *\/ 
+ * - ## //* name:NAME [type:TYPE] [nullok:[TRUE|FALSE]] [descr:DESCR] *\/ 
  * for a variable named NAME with the optional type TYPE (which can be a GType 
  * name or a custom database type name), with the optional "nullok" attribute 
  * and an optional description DESCR. Note that the NAME, TYPE and DESCR literals here 
  * must be quoted (simple or double quotes) if they include non alphanumeric 
  * characters, and that there must always be at least a space between the 
- * ## and the \/* ... *\/.
+ * ## and the //* ... *\/.
  *
  * @ingroup Connection
  */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]