gnomemm r2021 - in libgdamm/trunk: . libgda/src



Author: murrayc
Date: Tue Jan 27 16:05:06 2009
New Revision: 2021
URL: http://svn.gnome.org/viewvc/gnomemm?rev=2021&view=rev

Log:
2009-01-27  Murray Cumming  <murrayc murrayc com>

* libgda/src/serverprovider.ccg:
* libgda/src/serverprovider.hg: Add a create_operation() overload that 
takes no parameters.

Modified:
   libgdamm/trunk/ChangeLog
   libgdamm/trunk/libgda/src/serverprovider.ccg
   libgdamm/trunk/libgda/src/serverprovider.hg

Modified: libgdamm/trunk/libgda/src/serverprovider.ccg
==============================================================================
--- libgdamm/trunk/libgda/src/serverprovider.ccg	(original)
+++ libgdamm/trunk/libgda/src/serverprovider.ccg	Tue Jan 27 16:05:06 2009
@@ -57,6 +57,27 @@
   return retval;
 }
 
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+Glib::RefPtr<ServerOperation> ServerProvider::create_operation(const Glib::RefPtr<Connection>& cnc, ServerOperationType type)
+#else
+Glib::RefPtr<ServerOperation> ServerProvider::create_operation(const Glib::RefPtr<Connection>& cnc, ServerOperationType type, std::auto_ptr<Glib::Error>& error)
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+{
+  GError* gerror = 0;
+  Glib::RefPtr<ServerOperation> retvalue = Glib::wrap(gda_server_provider_create_operation(gobj(), Glib::unwrap(cnc), ((GdaServerOperationType)(type)), 0, &(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
+
+  return retvalue;
+}
+
+
+
 } // namespace Gda
 
 } // namespace Gnome

Modified: libgdamm/trunk/libgda/src/serverprovider.hg
==============================================================================
--- libgdamm/trunk/libgda/src/serverprovider.hg	(original)
+++ libgdamm/trunk/libgda/src/serverprovider.hg	Tue Jan 27 16:05:06 2009
@@ -66,6 +66,25 @@
   _WRAP_METHOD(bool supports_operation(const Glib::RefPtr<Connection>& cnc, ServerOperationType type, const Glib::RefPtr<Set>& options) const, gda_server_provider_supports_operation)
 
   _WRAP_METHOD(Glib::RefPtr<ServerOperation> create_operation(const Glib::RefPtr<Connection>& cnc, ServerOperationType type, const Glib::RefPtr<Set>& options), gda_server_provider_create_operation, errthrow)
+  
+  /** Creates a new Gda::ServerOperation object which can be modified in order to perform the @a type type of
+   * action. The @a options can contain:
+   * &lt;itemizedlist&gt;
+   * &lt;listitem&gt;named values which ID is a path in the resulting GdaServerOperation object, to initialize some value&lt;/listitem&gt;
+   * &lt;listitem&gt;named values which may change the contents of the GdaServerOperation, see this section for more information&lt;/listitem&gt;
+   * &lt;/itemizedlist&gt;
+   * @param cnc A Gda::Connection object which will be used to perform an action, or <tt>0</tt>.
+   * @param type The type of operation requested.
+   * @return A new Gda::ServerOperation object, or <tt>0</tt> in the provider does not support the @a type type
+   * of operation or if an error occurred.
+   */
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+  Glib::RefPtr<ServerOperation> create_operation(const Glib::RefPtr<Connection>& cnc, ServerOperationType type);
+#else
+  Glib::RefPtr<ServerOperation> create_operation(const Glib::RefPtr<Connection>& cnc, ServerOperationType type, std::auto_ptr<Glib::Error>& error);
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+
+
   _WRAP_METHOD(Glib::ustring render_operation(const Glib::RefPtr<Connection>& cnc, const Glib::RefPtr<ServerOperation>& op), gda_server_provider_render_operation, errthrow)
   _WRAP_METHOD(bool perform_operation(const Glib::RefPtr<Connection>& cnc, const Glib::RefPtr<ServerOperation>& op), gda_server_provider_perform_operation, errthrow)
 



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