Midgard Blob


Data Structures

struct  MidgardBlobClass

Functions

GType midgard_blob_get_type (void)
MidgardBlob midgard_blob_new (MidgardConection *mgd, MidgardObject *attachment)
GIOChannel midgard_blob_read (MidgardBlob *self)
GIOChannel midgard_blob_write (MidgardBlob *self, const gchar *content)
void midgard_blob_destroy (MidgardBlob *self)

Variables

MidgardBlobClass parent

Detailed Description

Simple class which is intented to manage file descriptors via GIOChannel interface. MidgardBlob encapsulate relations among all typical MidgardSchema objects, midgard_attachment objects and MidgardConnection handler. It's designed as a helper to build language bindings written for Midgard system.

Function Documentation

void midgard_blob_destroy MidgardBlob *  self  ) 
 

Destroy Midgard Blob instance.

Parameters:
self,MidgardBlob self instance.
Destroy Midgard Blob instance and all data associated with this instance. Any file handler assigned to destroyed instance will be freed as well. It's enough to call g_object_unref to destroy Midgard Blob. This method is hidden internally in MidgardObjectClass finalize method and it's added for readability.

GType midgard_blob_get_type void   ) 
 

Returns Midgard Blob Gtype value. Registers this type unless already registered.

Definition at line 126 of file midgard_blob.c.

MidgardBlob midgard_blob_new MidgardConection *  mgd,
MidgardObject *  attachment
 

Instatiate new Midgard Blob.

Parameters:
mgd,MidgardConection pointer
attachment,MidgardObject of MIDGARD_TYPE_ATTACHMENT type.
Returns:
MidgardBlob, newly instatiated MidgardBlob object.
Instatiate new Midgard Blob object for the given midgard_attachment object. This is almost the same constructor as g_object_new, but unlike that one, midgard_object_new requires Midgard Connection handler's pointer. Initializes new Midgard Blob object and its internal data in currently used MidgardConnection context.

GIOChannel midgard_blob_read MidgardBlob *  self  ) 
 

Returns GIOChannel pointer for the given midgard_blob.

Parameters:
self,Midgard Blob self instance
Returns:
GIOChannel which holds filename's content, NULL if there is no filename associated with midgard_attachment for the given Midgard Blob instance.
Returned pointer is owned by midgard-core and should not be freed.

Definition at line 46 of file midgard_blob.c.

References MGD_ERR_USER_DATA, and midgard_set_error().

Here is the call graph for this function:

GIOChannel midgard_blob_write MidgardBlob *  self,
const gchar *  content
 

Returns GIOChannel pointer for written blob file.

Parameters:
self,MidgardBlob self instance.
content,content which should be written to file.
Returns:
GIOChannel pointer if content has been successfully written to file. Otherwise returns NULL.


Variable Documentation

struct MidgardBlobClass parent
 

MidgardObject structure

Referenced by midgard_object_get_by_path(), and midgard_object_is_in_parent_tree().


Generated on Thu Feb 22 06:15:20 2007 for midgard-core by  doxygen 1.4.6