~ubuntu-branches/ubuntu/trusty/libgdamm5.0/trusty

« back to all changes in this revision

Viewing changes to libgda/src/xatransaction.hg

  • Committer: Package Import Robot
  • Author(s): Daniel Holbach
  • Date: 2012-02-07 16:44:36 UTC
  • Revision ID: package-import@ubuntu.com-20120207164436-j1odzs6zz6gz2vae
Tags: upstream-4.99.6
ImportĀ upstreamĀ versionĀ 4.99.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- C++ -*- //
 
2
 
 
3
/* xatransaction.h
 
4
 *
 
5
 * Copyright 2006 libgdamm Development Team
 
6
 *
 
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.
 
11
 *
 
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.
 
16
 *
 
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.
 
20
 */
 
21
 
 
22
_DEFS(libgdamm,libgda)
 
23
_PINCLUDE(glibmm/private/object_p.h)
 
24
 
 
25
#include <libgdamm/connection.h>
 
26
 
 
27
namespace Gnome
 
28
{
 
29
 
 
30
namespace Gda
 
31
{
 
32
 
 
33
//TODO: Convert the full C documentation to here.
 
34
/** Distributed transaction manager.
 
35
  *
 
36
  * @ingroup Connections
 
37
  */
 
38
class XaTransaction : public Glib::Object
 
39
{
 
40
  _CLASS_GOBJECT(XaTransaction, GdaXaTransaction, GDA_XA_TRANSACTION, Glib::Object, GObject)
 
41
protected:
 
42
  _WRAP_CTOR(XaTransaction(guint32 format_id, const Glib::ustring& transaction_id), gda_xa_transaction_new)
 
43
public:
 
44
  _WRAP_CREATE(guint32 format_id, const Glib::ustring& transaction_id)
 
45
  
 
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)
 
48
 
 
49
  _WRAP_METHOD(bool begin(), gda_xa_transaction_begin, errthrow)
 
50
  _WRAP_METHOD(bool rollback(), gda_xa_transaction_rollback, errthrow)
 
51
 
 
52
  typedef std::vector<Glib::RefPtr<const Connection> > ConnectionVector;
 
53
 
 
54
  _WRAP_METHOD_DOCS_ONLY(gda_xa_transaction_commit)  
 
55
  bool commit(ConnectionVector& cnc_to_recover);
 
56
 
 
57
  _WRAP_METHOD_DOCS_ONLY (gda_xa_transaction_commit_recovered)  
 
58
  bool commit_recovered(ConnectionVector& cnc_to_recover);
 
59
  
 
60
  _WRAP_PROPERTY("transaction-id", Glib::ustring)
 
61
  _WRAP_PROPERTY("format-id", guint)
 
62
};
 
63
 
 
64
} // namespace Gda
 
65
} // namespace Gnome
 
66