// -*- C++ -*- //

/* blob-op.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 Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
_DEFS(libgdamm,libgda)
_PINCLUDE(glibmm/private/object_p.h)

#include <glibmm/object.h>

namespace Gnome
{

namespace Gda
{

class Blob;

/** Blobs handling. 
 * This object is a base class for individual database providers which support BLOB types.
 * It supports operations to read and write data in a BLOB.
 *
 * @ingroup DataHandlers
 */
class BlobOp : public Glib::Object
{
  _CLASS_GOBJECT(BlobOp, GdaBlobOp, GDA_BLOB_OP, Glib::Object, GObject)
  
  protected:
    _CTOR_DEFAULT
  
  public:
    _WRAP_CREATE()
    
    _WRAP_METHOD(long get_length() const, gda_blob_op_get_length)
    _WRAP_METHOD(long read(Blob& blob, long offset, long size), gda_blob_op_read)
    _WRAP_METHOD(long write(Blob& blob, long offset), gda_blob_op_write)
    _WRAP_METHOD(bool read_all(Blob& blob), gda_blob_op_read_all)
    _WRAP_METHOD(bool write_all(Blob& blob), gda_blob_op_write_all)
    
    // vfuncs are not wrapped!
};

} // namespace Gda

} // namespace Gnome
