Gnome::Gda::BlobOp Class Reference
Data Handlers

Blobs handling. More...

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

## Public Member Functions

| BlobOp (BlobOp&& src) noexcept
BlobOp& | operator= (BlobOp&& src) noexcept
virtual | ~BlobOp () noexcept
GdaBlobOp* | gobj ()
| Provides access to the underlying C GObject. More...
const GdaBlobOp* | gobj () const
| Provides access to the underlying C GObject. More...
GdaBlobOp* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
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. More...
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. More...
bool | read_all (Blob& blob)
| Reads the whole contents of the blob manipulated by op into blob. More...
bool | write_all (Blob& blob)
| Writes the whole contents of blob into the blob manipulated by op. More...
Public Member Functions inherited from Glib::Object
| Object (const Object &)=delete
Object & | operator= (const Object &)=delete
| Object (Object &&src) noexcept
Object & | operator= (Object &&src) noexcept
void * | get_data (const QueryQuark &key)
void | set_data (const Quark &key, void *data)
void | set_data (const Quark &key, void *data, DestroyNotify notify)
void | remove_data (const QueryQuark &quark)
void * | steal_data (const QueryQuark &quark)
Glib::RefPtr< Glib::Object > | wrap (GObject *object, bool take_copy=false)
Public Member Functions inherited from Glib::ObjectBase
| ObjectBase (const ObjectBase &)=delete
ObjectBase & | operator= (const ObjectBase &)=delete
void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value)
void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const
void | set_property (const Glib::ustring &property_name, const PropertyType &value)
void | get_property (const Glib::ustring &property_name, PropertyType &value) const
void | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void > &slot)
sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, const sigc::slot< void > &slot)
void | freeze_notify ()
void | thaw_notify ()
virtual void | reference () const
virtual void | unreference () const
GObject * | gobj ()
const GObject * | gobj () const
GObject * | gobj_copy () const
Public Member Functions inherited from sigc::trackable
| trackable ()
| trackable (const trackable &src)
| trackable (trackable &&src) noexcept
| ~trackable ()
void | add_destroy_notify_callback (void *data, func_destroy_notify func) const
void | notify_callbacks ()
trackable & | operator= (const trackable &src)
trackable & | operator= (trackable &&src) noexcept
void | remove_destroy_notify_callback (void *data) const

## Static Public Member Functions

static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...
static Glib::RefPtr< BlobOp > | create ()

## Protected Member Functions

| BlobOp ()
Protected Member Functions inherited from Glib::Object
| Object ()
| Object (const Glib::ConstructParams &construct_params)
| Object (GObject *castitem)
virtual | ~Object () noexcept
Protected Member Functions inherited from Glib::ObjectBase
| ObjectBase ()
| ObjectBase (const char *custom_type_name)
| ObjectBase (const std::type_info &custom_type_info)
| ObjectBase (ObjectBase &&src) noexcept
ObjectBase & | operator= (ObjectBase &&src) noexcept
virtual | ~ObjectBase () noexcept=0
void | initialize (GObject *castitem)
void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper)

## Related Functions

(Note that these are not member functions.)
Glib::RefPtr< Gnome::Gda::BlobOp > | wrap (GdaBlobOp* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...

## Additional Inherited Members

Public Types inherited from Glib::Object
typedef void(* | DestroyNotify) (gpointer data)
Public Types inherited from sigc::trackable
typedef internal::func_destroy_notify | func_destroy_notify

## 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

Gnome::Gda::BlobOp::BlobOp | ( | BlobOp&& | src | ) |

noexcept

virtual Gnome::Gda::BlobOp::~BlobOp | ( |  | ) |

virtualnoexcept

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.

static GType Gnome::Gda::BlobOp::get_type | ( |  | ) |

static

Get the GType for this class, for use with the underlying GObject type system.

GdaBlobOp* Gnome::Gda::BlobOp::gobj | ( |  | ) |

inline

Provides access to the underlying C GObject.

const GdaBlobOp* Gnome::Gda::BlobOp::gobj | ( |  | ) | const

inline

Provides access to the underlying C GObject.

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.

BlobOp& Gnome::Gda::BlobOp::operator= | ( | BlobOp&& | src | ) |

noexcept

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

  blob | A Gda::Blob to read data to.
  offset | Offset to read from the start of the blob (starts at 0).
  size | Maximum 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

  blob | A 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

  blob | A Gda::Blob which contains the data to write.
  offset | Offset 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

  blob | A 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

  object | The C instance.
  take_copy | False 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:

- libgdamm/blobop.h