5
* Copyright 2006 libgdamm Development Team
7
* This library is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU Lesser General Public
9
* License as published by the Free Software Foundation; either
10
* version 2.1 of the License, or(at your option) any later version.
12
* This library is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
* Lesser General Public License for more details.
17
* You should have received a copy of the GNU Lesser General Public
18
* License along with this library; if not, write to the Free
19
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22
_DEFS(libgdamm,libgda)
23
_PINCLUDE(glibmm/private/object_p.h)
25
#include <libgdamm/connection.h>
33
//TODO: Convert the full C documentation to here.
34
/** Distributed transaction manager.
36
* @ingroup Connections
38
class XaTransaction : public Glib::Object
40
_CLASS_GOBJECT(XaTransaction, GdaXaTransaction, GDA_XA_TRANSACTION, Glib::Object, GObject)
42
_WRAP_CTOR(XaTransaction(guint32 format_id, const Glib::ustring& transaction_id), gda_xa_transaction_new)
44
_WRAP_CREATE(guint32 format_id, const Glib::ustring& transaction_id)
46
_WRAP_METHOD(bool register_connection(const Glib::RefPtr<Connection>& cnc, const Glib::ustring& branch), gda_xa_transaction_register_connection, errthrow)
47
_WRAP_METHOD(void unregister_connection(const Glib::RefPtr<Connection>& cnc), gda_xa_transaction_unregister_connection)
49
_WRAP_METHOD(bool begin(), gda_xa_transaction_begin, errthrow)
50
_WRAP_METHOD(bool rollback(), gda_xa_transaction_rollback, errthrow)
52
typedef std::vector<Glib::RefPtr<const Connection> > ConnectionVector;
54
_WRAP_METHOD_DOCS_ONLY(gda_xa_transaction_commit)
55
bool commit(ConnectionVector& cnc_to_recover);
57
_WRAP_METHOD_DOCS_ONLY (gda_xa_transaction_commit_recovered)
58
bool commit_recovered(ConnectionVector& cnc_to_recover);
60
_WRAP_PROPERTY("transaction-id", Glib::ustring)
61
_WRAP_PROPERTY("format-id", guint)