// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGDAMM_TRANSACTION_H
#define _LIBGDAMM_TRANSACTION_H

#include <glibmm.h>

/* $Id: transaction.hg,v 1.5 2004/11/28 15:07:16 murrayc Exp $ */
// -*- C++ -*- // this is for the .hg, I realize gensig puts one in

/* transaction.h
 * 
 * Copyright 2001      Free Software Foundation
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <glibmm/object.h>
#include <libgda/gda-transaction.h>


#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GdaTransaction GdaTransaction;
typedef struct _GdaTransactionClass GdaTransactionClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


namespace Gnome
{

namespace Gda
{ class Transaction_Class; } // namespace Gda

} // namespace Gnome
namespace Gnome
{
  
namespace Gda
{

/** @addtogroup libgdammEnums Enums and Flags */

/**
 * @ingroup libgdammEnums
 */
enum TransactionIsolation
{
  TRANSACTION_ISOLATION_UNKNOWN,
  TRANSACTION_ISOLATION_READ_COMMITTED,
  TRANSACTION_ISOLATION_READ_UNCOMMITTED,
  TRANSACTION_ISOLATION_REPEATABLE_READ,
  TRANSACTION_ISOLATION_SERIALIZABLE
};

} // namespace Gda

} // namespace Gnome


#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace Glib
{

template <>
class Value<Gnome::Gda::TransactionIsolation> : public Glib::Value_Enum<Gnome::Gda::TransactionIsolation>
{
public:
  static GType value_type() G_GNUC_CONST;
};

} // namespace Glib
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


namespace Gnome
{

namespace Gda
{


class Transaction : public Glib::Object
{
  
#ifndef DOXYGEN_SHOULD_SKIP_THIS

public:
  typedef Transaction CppObjectType;
  typedef Transaction_Class CppClassType;
  typedef GdaTransaction BaseObjectType;
  typedef GdaTransactionClass BaseClassType;

private:  friend class Transaction_Class;
  static CppClassType transaction_class_;

private:
  // noncopyable
  Transaction(const Transaction&);
  Transaction& operator=(const Transaction&);

protected:
  explicit Transaction(const Glib::ConstructParams& construct_params);
  explicit Transaction(GdaTransaction* castitem);

#endif /* DOXYGEN_SHOULD_SKIP_THIS */

public:
  virtual ~Transaction();

#ifndef DOXYGEN_SHOULD_SKIP_THIS
  static GType get_type()      G_GNUC_CONST;
  static GType get_base_type() G_GNUC_CONST;
#endif

  ///Provides access to the underlying C GObject.
  GdaTransaction*       gobj()       { return reinterpret_cast<GdaTransaction*>(gobject_); }

  ///Provides access to the underlying C GObject.
  const GdaTransaction* gobj() const { return reinterpret_cast<GdaTransaction*>(gobject_); }

  ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
  GdaTransaction* gobj_copy();

private:

protected:
  explicit Transaction(const Glib::ustring& name = Glib::ustring());
  

public:
  
  static Glib::RefPtr<Transaction> create(const Glib::ustring& name);


  TransactionIsolation get_isolation_level() const;
  
  void set_isolation_level(GdaTransactionIsolation level);
                   
  
  Glib::ustring get_name() const;
  
  void set_name(const Glib::ustring& name);


public:

public:
  //C++ methods used to invoke GTK+ virtual functions:

protected:
  //GTK+ Virtual Functions (override these to change behaviour):

  //Default Signal Handlers::


};

} // namespace Gda
} // namespace Gnome


namespace Glib
{
  /** @relates Gnome::Gda::Transaction
   * @param object The C instance
   * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
   * @result A C++ instance that wraps this C instance.
   */
  Glib::RefPtr<Gnome::Gda::Transaction> wrap(GdaTransaction* object, bool take_copy = false);
}


#endif /* _LIBGDAMM_TRANSACTION_H */

