/* $Id: command.hg,v 1.5 2004/04/29 23:07:13 murrayc Exp $ */ // -*- C++ -*- // this is for the .hg, I realize gensig puts one in /* command.h * * Copyright 2003 libgdamm Development Team * * 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 #include _DEFS(libgdamm,libgda) _PINCLUDE(glibmm/private/object_p.h) #ifndef DOXYGEN_SHOULD_SKIP_THIS extern "C" { typedef struct _GdaCommand GdaCommand; } #endif namespace Gnome { namespace Gda { _WRAP_ENUM(CommandType, GdaCommandType) _WRAP_ENUM(CommandOptions, GdaCommandOptions) class Command { _CLASS_OPAQUE_COPYABLE(Command, GdaCommand, NONE, gda_command_copy, gda_command_free) _IGNORE(gda_command_copy, gda_command_free) public: //TODO: What do the other command types do? How do they work? explicit Command(const Glib::ustring& text, CommandType type = COMMAND_TYPE_SQL, CommandOptions options = COMMAND_OPTION_STOP_ON_ERRORS); //TODO: Good defaults. _WRAP_METHOD(Glib::ustring get_text() const, gda_command_get_text) _WRAP_METHOD(void set_text(const Glib::ustring& text), gda_command_set_text) _WRAP_METHOD(CommandType get_command_type() const, gda_command_get_command_type) _WRAP_METHOD(void set_command_type(CommandType type), gda_command_set_command_type) _WRAP_METHOD(CommandOptions get_options() const, gda_command_get_options) _WRAP_METHOD(void set_options(CommandOptions options), gda_command_set_options) _WRAP_METHOD(Glib::RefPtr get_transaction(), gda_command_get_transaction) _WRAP_METHOD(Glib::RefPtr get_transaction() const, gda_command_get_transaction) _WRAP_METHOD(void set_transaction(const Glib::RefPtr& xaction), gda_command_set_transaction) }; } // namespace Gda } // namespace Gnome