Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions

Gnome::Gda::BlobOp Class Reference
[Data Handlers]

Blobs handling. More...

Inheritance diagram for Gnome::Gda::BlobOp:
Inheritance graph
[legend]
Collaboration diagram for Gnome::Gda::BlobOp:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual ~BlobOp ()
GdaBlobOp* gobj ()
 Provides access to the underlying C GObject.
const GdaBlobOp* gobj () const
 Provides access to the underlying C GObject.
GdaBlobOp* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
long get_length () const
long read (Blob& blob, long offset, long size)
 Reads a chunk of bytes from the BLOB accessible through op into blob.
long write (Blob& blob, long offset)
 Writes a chunk of bytes from a blob to the BLOB accessible through op, blob is unchanged after this call.
bool read_all (Blob& blob)
 Reads the whole contents of the blob manipulated by op into blob.
bool write_all (Blob& blob)
 Writes the whole contents of blob into the blob manipulated by op.

Static Public Member Functions

static Glib::RefPtr< BlobOpcreate ()

Protected Member Functions

 BlobOp ()

Related Functions

(Note that these are not member functions.)


Glib::RefPtr< Gnome::Gda::BlobOpwrap (GdaBlobOp* object, bool take_copy=false)
 A Glib::wrap() method for this object.

Detailed Description

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.


Constructor & Destructor Documentation

virtual Gnome::Gda::BlobOp::~BlobOp (  ) [virtual]
Gnome::Gda::BlobOp::BlobOp (  ) [protected]

Member Function Documentation

static Glib::RefPtr<BlobOp> Gnome::Gda::BlobOp::create (  ) [static]
long Gnome::Gda::BlobOp::get_length (  ) const
Returns:
The length of the blob in bytes. In case of error, -1 is returned and the provider should have added an error (a Gda::ConnectionEvent) to the connection.
const GdaBlobOp* Gnome::Gda::BlobOp::gobj (  ) const [inline]

Provides access to the underlying C GObject.

Reimplemented from Glib::ObjectBase.

GdaBlobOp* Gnome::Gda::BlobOp::gobj (  ) [inline]

Provides access to the underlying C GObject.

Reimplemented from Glib::ObjectBase.

GdaBlobOp* Gnome::Gda::BlobOp::gobj_copy (  )

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

long Gnome::Gda::BlobOp::read ( Blob blob,
long  offset,
long  size 
)

Reads a chunk of bytes from the BLOB accessible through op into blob.

Parameters:
blobA Gda::Blob to read data to.
offsetOffset to read from the start of the blob (starts at 0).
sizeMaximum number of bytes to read.
Returns:
The number of bytes actually read. In case of error, -1 is returned and the provider should have added an error to the connection.
bool Gnome::Gda::BlobOp::read_all ( Blob blob )

Reads the whole contents of the blob manipulated by op into blob.

Parameters:
blobA Gda::Blob to read data to.
Returns:
true if blob->data contains the whole BLOB manipulated by op.
long Gnome::Gda::BlobOp::write ( Blob blob,
long  offset 
)

Writes a chunk of bytes from a blob to the BLOB accessible through op, blob is unchanged after this call.

If blob has an associated Gda::BlobOp (ie. if blob->op is not 0) then the data to be written using op is the data fetched using blob->op.

Parameters:
blobA Gda::Blob which contains the data to write.
offsetOffset to write from the start of the blob (starts at 0).
Returns:
The number of bytes written. In case of error, -1 is returned and the provider should have added an error to the connection.
bool Gnome::Gda::BlobOp::write_all ( Blob blob )

Writes the whole contents of blob into the blob manipulated by op.

If necessary the resulting blob is truncated from its previous length.

Parameters:
blobA Gda::Blob which contains the data to write.
Returns:
true on success.

Friends And Related Function Documentation

Glib::RefPtr< Gnome::Gda::BlobOp > wrap ( GdaBlobOp *  object,
bool  take_copy = false 
) [related]

A Glib::wrap() method for this object.

Parameters:
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns:
A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file: