LtObject

LtObject — Database objects

Synopsis




            LtObject;
guint       lt_object_get_id                (const LtObject *obj);
gboolean    lt_object_get_in_db             (const LtObject *obj);
void        lt_free_object_list             (GList *list);

Object Hierarchy


  GObject
   +----LtObject
         +----LtSource
         +----LtTag

Properties


  "id"                   guint                 : Read / Write / Construct Only
  "in-db"                gboolean              : Read / Write / Construct Only

Signals


"deleted"   void        user_function      (LtObject *object,
                                            gpointer  user_data)      : Run last / Action

Description

Abstract base class for objects which mirror the leaftag database.

Details

LtObject

typedef struct _LtObject LtObject;

The LtObject struct contains private data only, and should be manipulated using the functions below.


lt_object_get_id ()

guint       lt_object_get_id                (const LtObject *obj);

Retreive the ID of the object.

obj : An LtObject
Returns : The ID of the object.

lt_object_get_in_db ()

gboolean    lt_object_get_in_db             (const LtObject *obj);

Look up whether or not the object is in the database.

obj : An LtObject
Returns : TRUE if the object exists in the database. FALSE otherwise.

lt_free_object_list ()

void        lt_free_object_list             (GList *list);

Frees a GList and unrefs all objects inside of it. This assumes that there are only GObjects in the list, and may spew errors if anything else exists inside of it.

list : A list of LtObjects

Property Details

The "id" property

  "id"                   guint                 : Read / Write / Construct Only

The ID of the object.

Allowed values: <= G_MAXINT

Default value: 0


The "in-db" property

  "in-db"                gboolean              : Read / Write / Construct Only

Is the object stored in the database.

Default value: FALSE

Signal Details

The "deleted" signal

void        user_function                  (LtObject *object,
                                            gpointer  user_data)      : Run last / Action

The ::deleted signal is emitted when the object is removed from the database.

object : The object which was deleted
user_data : user data set when the signal handler was connected.