gnomemm r1566 - in libgdamm/branches/libgdamm-4-0: . examples examples/introspection examples/list_data_sources examples/simple_iter libgda/libgdamm libgda/src
- From: jhs svn gnome org
- To: svn-commits-list gnome org
- Subject: gnomemm r1566 - in libgdamm/branches/libgdamm-4-0: . examples examples/introspection examples/list_data_sources examples/simple_iter libgda/libgdamm libgda/src
- Date: Tue, 17 Jun 2008 10:17:10 +0000 (UTC)
Author: jhs
Date: Tue Jun 17 10:17:10 2008
New Revision: 1566
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1566&view=rev
Log:
2008-06-17 Johannes Schmid <jhs gnome org>
* configure.in:
* examples/*:
Cleaned up example
* libgda/libgdamm/Makefile.am:
* libgda/src/batch.ccg:
* libgda/src/batch.hg:
* libgda/src/config.hg:
* libgda/src/libgda_methods.defs:
* libgda/src/metastore.hg:
* libgda/src/row.hg:
* libgda/src/serveroperation.hg:
Added some signals using \"no_default_handler\" option and fixed
libary version and naming
Removed:
libgdamm/branches/libgdamm-4-0/examples/introspection/
libgdamm/branches/libgdamm-4-0/examples/list_data_sources/
libgdamm/branches/libgdamm-4-0/examples/simple_iter/
Modified:
libgdamm/branches/libgdamm-4-0/configure.in
libgdamm/branches/libgdamm-4-0/examples/Makefile.am
libgdamm/branches/libgdamm-4-0/examples/Makefile.am_fragment
libgdamm/branches/libgdamm-4-0/libgda/libgdamm/Makefile.am
libgdamm/branches/libgdamm-4-0/libgda/src/batch.ccg
libgdamm/branches/libgdamm-4-0/libgda/src/batch.hg
libgdamm/branches/libgdamm-4-0/libgda/src/config.hg
libgdamm/branches/libgdamm-4-0/libgda/src/libgda_methods.defs
libgdamm/branches/libgdamm-4-0/libgda/src/metastore.hg
libgdamm/branches/libgdamm-4-0/libgda/src/row.hg
libgdamm/branches/libgdamm-4-0/libgda/src/serveroperation.hg
Modified: libgdamm/branches/libgdamm-4-0/configure.in
==============================================================================
--- libgdamm/branches/libgdamm-4-0/configure.in (original)
+++ libgdamm/branches/libgdamm-4-0/configure.in Tue Jun 17 10:17:10 2008
@@ -183,9 +183,6 @@
docs/reference/Doxyfile
examples/Makefile
- examples/list_data_sources/Makefile
- examples/introspection/Makefile
examples/simple/Makefile
- examples/simple_iter/Makefile
])
Modified: libgdamm/branches/libgdamm-4-0/examples/Makefile.am
==============================================================================
--- libgdamm/branches/libgdamm-4-0/examples/Makefile.am (original)
+++ libgdamm/branches/libgdamm-4-0/examples/Makefile.am Tue Jun 17 10:17:10 2008
@@ -1,4 +1,4 @@
-SUBDIRS = list_data_sources introspection simple simple_iter
+SUBDIRS = simple
EXTRA_DIST = Makefile.am_fragment README.txt
Modified: libgdamm/branches/libgdamm-4-0/examples/Makefile.am_fragment
==============================================================================
--- libgdamm/branches/libgdamm-4-0/examples/Makefile.am_fragment (original)
+++ libgdamm/branches/libgdamm-4-0/examples/Makefile.am_fragment Tue Jun 17 10:17:10 2008
@@ -1,4 +1,4 @@
-local_libgdamm_lib = $(top_builddir)/libgda/libgdamm/libgdamm-3.0.la
+local_libgdamm_lib = $(top_builddir)/libgda/libgdamm/libgdamm-4.0.la
LIBS = $(local_libgdamm_lib) $(LIBGDAMM_LIBS)
Modified: libgdamm/branches/libgdamm-4-0/libgda/libgdamm/Makefile.am
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/libgdamm/Makefile.am (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/libgdamm/Makefile.am Tue Jun 17 10:17:10 2008
@@ -4,7 +4,7 @@
SUBDIRS = private
sublib_name = libgdamm
-sublib_libname = libgdamm-3.0
+sublib_libname = libgdamm-4.0
sublib_libversion = $(LIBGDAMM_SO_VERSION)
sublib_namespace = Gda
sublib_cflags = $(LIBGDAMM_CFLAGS)
@@ -16,8 +16,8 @@
include $(top_srcdir)/build_shared/Makefile_build_gensrc.am_fragment
-lib_LTLIBRARIES = libgdamm-3.0.la
-libgdamm_3_0_la_SOURCES = $(files_all_cc)
-libgdamm_3_0_la_LDFLAGS = $(common_ldflags)
-libgdamm_3_0_la_LIBADD = $(LIBGDAMM_LIBS)
+lib_LTLIBRARIES = libgdamm-4.0.la
+libgdamm_4_0_la_SOURCES = $(files_all_cc)
+libgdamm_4_0_la_LDFLAGS = $(common_ldflags)
+libgdamm_4_0_la_LIBADD = $(LIBGDAMM_LIBS)
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/batch.ccg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/batch.ccg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/batch.ccg Tue Jun 17 10:17:10 2008
@@ -25,6 +25,33 @@
namespace Gnome
{
+namespace Gda
+{
+
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+bool Batch::get_parameters(Glib::RefPtr<Set>& params)
+#else
+bool Batch::get_parameters(Glib::RefPtr<Set>& params, std::auto_ptr<Glib::Error>& error)
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+{
+ GError* gerror = 0;
+ GdaSet* set = 0;
+ bool retval = gda_batch_get_parameters(gobj(), &set, &gerror);
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+ if(gerror)
+ ::Glib::Error::throw_exception(gerror);
+#else
+ if(gerror)
+ error = ::Glib::Error::throw_exception(gerror);
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+ if (set)
+ {
+ params = Glib::wrap(set);
+ }
+ return retval;
+}
+
+}
} /* namespace Gnome */
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/batch.hg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/batch.hg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/batch.hg Tue Jun 17 10:17:10 2008
@@ -44,7 +44,7 @@
_CTOR_DEFAULT()
public:
_WRAP_CREATE()
- _WRAP_METHOD(Glib::RefPtr<Batch> copy(), gda_batch_new_copy)
+ _WRAP_METHOD(Glib::RefPtr<Batch> copy(), gda_batch_copy)
_WRAP_METHOD(void add_statement(const Glib::RefPtr<Statement>& stmt), gda_batch_add_statement)
_WRAP_METHOD(void remove_statement(const Glib::RefPtr<Statement>& stmt), gda_batch_remove_statement)
@@ -53,8 +53,16 @@
#m4 _CONVERSION(`const GSList*',`StatementSList',`$2((GSList*)$3, Glib::OWNERSHIP_NONE)')
_WRAP_METHOD(StatementSList get_statements(), gda_batch_get_statements)
+ _WRAP_METHOD_DOCS_ONLY(gda_statement_get_parameters)
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ bool get_parameters(Glib::RefPtr<Set>& params);
+ #else
+ bool get_parameters(Glib::RefPtr<Set>& params, std::auto_ptr<Glib::Error>& error);
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
+
// FIXME: Use better marshaller in libgda
- //_WRAP_SIGNAL(void changed(Glib::RefPtr<Statement> stmt), "changed")
+ #m4 _CONVERSION(`GObject*',`Glib::RefPtr<Statement>',`Glib::wrap(GDA_STATEMENT($3))')
+ _WRAP_SIGNAL(void changed(Glib::RefPtr<Statement> stmt), "changed", no_default_handler)
};
} // namespace Gda
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/config.hg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/config.hg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/config.hg Tue Jun 17 10:17:10 2008
@@ -22,6 +22,7 @@
#include <glibmm/object.h>
#include <libgdamm/serverprovider.h>
#include <libgdamm/datamodel.h>
+#include <libgda/gda-config.h>
_DEFS(libgdamm,libgda)
_PINCLUDE(glibmm/private/object_p.h)
@@ -32,6 +33,8 @@
namespace Gda
{
+typedef GdaDataSourceInfo DataSourceInfo;
+
/** Configuration â Access/Management of libgda configuration
*
* @ingroup Configuration
@@ -59,8 +62,13 @@
_WRAP_PROPERTY("system-file", std::string);
_WRAP_PROPERTY("user-file", std::string);
-
- // TODO: Signal -> marshallers
+
+ #m4 _EQUAL(GdaDataSourceInfo*, DataSourceInfo*)
+ #m4 _CONVERSION(`gpointer',`DataSourceInfo*',`(DataSourceInfo*)($3)')
+ _WRAP_SIGNAL(void dsn_added(DataSourceInfo* info), "dsn-added", no_default_handler)
+ _WRAP_SIGNAL(void dsn_changed(DataSourceInfo* info), "dsn-changed", no_default_handler)
+ _WRAP_SIGNAL(void dsn_removed(DataSourceInfo* info), "dsn-removed", no_default_handler)
+ _WRAP_SIGNAL(void dsn_to_be_removed(DataSourceInfo* info), "dsn-to-be-removed", no_default_handler)
};
} // namespace Gda
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/libgda_methods.defs
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/libgda_methods.defs (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/libgda_methods.defs Tue Jun 17 10:17:10 2008
@@ -844,9 +844,9 @@
(return-type "GdaBatch*")
)
-(define-method new_copy
+(define-method copy
(of-object "GdaBatch")
- (c-name "gda_batch_new_copy")
+ (c-name "gda_batch_copy")
(return-type "GdaBatch*")
)
@@ -880,6 +880,16 @@
(return-type "const-GSList*")
)
+(define-method get_parameters
+ (of-object "GdaBatch")
+ (c-name "gda_batch_get_parameters")
+ (return-type "gboolean")
+ (parameters
+ '("GdaSet**" "out_params")
+ '("GError**" "error")
+ )
+)
+
;; From gda-blob-op.h
@@ -1825,7 +1835,7 @@
(define-method batch_execute
(of-object "GdaConnection")
(c-name "gda_connection_batch_execute")
- (return-type "GObject*")
+ (return-type "GSList*")
(parameters
'("GdaBatch*" "batch")
'("GdaSet*" "params")
@@ -5159,7 +5169,7 @@
(define-method add_holder
(of-object "GdaSet")
(c-name "gda_set_add_holder")
- (return-type "none")
+ (return-type "gboolean")
(parameters
'("GdaHolder*" "holder")
)
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/metastore.hg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/metastore.hg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/metastore.hg Tue Jun 17 10:17:10 2008
@@ -73,7 +73,10 @@
_WRAP_PROPERTY("cnc", Glib::RefPtr<Connection>)
_WRAP_SIGNAL(void meta_reset(), "meta-reset")
- // TODO: meta-changed and suggest-update => marshallers
+ #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<>))
};
} // namespace Gda
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/row.hg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/row.hg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/row.hg Tue Jun 17 10:17:10 2008
@@ -70,16 +70,14 @@
_WRAP_METHOD(void set_is_default(int num, bool is_default = true), gda_row_set_is_default)
_WRAP_METHOD(bool get_is_default(int num) const, gda_row_get_is_default)
- //TODO: Properties.
-
_WRAP_PROPERTY("model", Glib::RefPtr<DataModel>)
//These are not sensible for libgdamm:
//_WRAP_PROPERTY("values", GList*)
//_WRAP_PROPERTY("nb_values", int)
-
- // TODO:
- //_WRAP_SIGNAL(bool value_to_change(int num, const Glib::ValueBase& current, const Glib::ValueBase& proposed), "value-to-change")
- //_WRAP_SIGNAL(void value_changed(int num, const Glib::ValueBase& current, const Glib::ValueBase& proposed), "value-changed")
+
+ // TODO: Check how to pass the GValue to this signal
+ //_WRAP_SIGNAL(bool value_to_change(int num, const Glib::ValueBase& current, const Glib::ValueBase& proposed), "value-to-change", no_default_handler)
+ //_WRAP_SIGNAL(void value_changed(int num, const Glib::ValueBase& current, const Glib::ValueBase& proposed), "value-changed", no_default_handler)
};
} // namespace Gda
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/serveroperation.hg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/serveroperation.hg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/serveroperation.hg Tue Jun 17 10:17:10 2008
@@ -82,10 +82,9 @@
_WRAP_METHOD(bool del_item_from_sequence(const std::string& item_path), gda_server_operation_del_item_from_sequence)
_WRAP_METHOD(guint add_item_to_sequence(const std::string& item_path), gda_server_operation_add_item_to_sequence)
_WRAP_METHOD(Glib::StringArrayHandle get_root_nodes(), gda_server_operation_get_root_nodes);
-
- //TODO: marshallers
- //_WRAP_SIGNAL(void signal_sequence_item_added(const Glib::ustring& arg1, int arg2), "sequence-item-added")
- //_WRAP_SIGNAL(void signal_sequence_item_remove(const Glib::ustring& arg1, int arg2), "sequence-item-remove")
+
+ _WRAP_SIGNAL(void signal_sequence_item_added(Glib::ustring arg1, int arg2), "sequence-item-added", no_default_handler)
+ _WRAP_SIGNAL(void signal_sequence_item_remove(Glib::ustring arg1, int arg2), "sequence-item-remove", no_default_handler)
_WRAP_PROPERTY("connection", Glib::RefPtr<Connection>)
_WRAP_PROPERTY("op-type", gint)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]