MIRAGE_Object object

MIRAGE_Object object — Base object class

Synopsis

#include <mirage.h>

                    MIRAGE_Object;
gboolean            mirage_object_set_debug_context     (MIRAGE_Object *self,
                                                         GObject *debug_context,
                                                         GError **error);
gboolean            mirage_object_get_debug_context     (MIRAGE_Object *self,
                                                         GObject **debug_context,
                                                         GError **error);
void                mirage_object_debug_message         (MIRAGE_Object *self,
                                                         gint level,
                                                         gchar *format,
                                                         ...);
void                mirage_object_debug_messagev        (MIRAGE_Object *self,
                                                         gint level,
                                                         gchar *format,
                                                         va_list args);
gboolean            mirage_object_set_mirage            (MIRAGE_Object *self,
                                                         GObject *mirage,
                                                         GError **error);
gboolean            mirage_object_get_mirage            (MIRAGE_Object *self,
                                                         GObject **mirage,
                                                         GError **error);
gboolean            mirage_object_set_parent            (MIRAGE_Object *self,
                                                         GObject *parent,
                                                         GError **error);
gboolean            mirage_object_get_parent            (MIRAGE_Object *self,
                                                         GObject **parent,
                                                         GError **error);
gboolean            mirage_object_attach_child          (MIRAGE_Object *self,
                                                         GObject *child,
                                                         GError **error);

Object Hierarchy

  GObject
   +----MIRAGE_Object
         +----MIRAGE_Mirage
         +----MIRAGE_Session
         +----MIRAGE_Disc
         +----MIRAGE_Track
         +----MIRAGE_Sector
         +----MIRAGE_Index
         +----MIRAGE_Language
         +----MIRAGE_Fragment
         +----MIRAGE_CDTextEncDec

Signals

  "object-modified"                                : Has Details

Description

MIRAGE_Object is used as a base object class throughout libMirage. It implements support for layout definitions (setting object's parent and children), debugging via debug contexts and passing reference to MIRAGE_Mirage object.

Details

MIRAGE_Object

typedef struct _MIRAGE_Object MIRAGE_Object;

Contains private data only, and should be accessed using the functions below.


mirage_object_set_debug_context ()

gboolean            mirage_object_set_debug_context     (MIRAGE_Object *self,
                                                         GObject *debug_context,
                                                         GError **error);

Sets object's debug context.

self :

a MIRAGE_Object

debug_context :

debug context

error :

location to store error, or NULL

Returns :

TRUE on success, FALSE on failure

mirage_object_get_debug_context ()

gboolean            mirage_object_get_debug_context     (MIRAGE_Object *self,
                                                         GObject **debug_context,
                                                         GError **error);

Retrieves object's debug context. A reference to debug context is stored in debug_context; it should be released with g_object_unref() when no longer needed.

self :

a MIRAGE_Object

debug_context :

location to store debug context, or NULL

error :

location to store error, or NULL

Returns :

TRUE on success, FALSE on failure

mirage_object_debug_message ()

void                mirage_object_debug_message         (MIRAGE_Object *self,
                                                         gint level,
                                                         gchar *format,
                                                         ...);

Outputs debug message with verbosity level level, format string format and format arguments Varargs. The message is displayed if object's debug context has mask that covers level, or if level is either MIRAGE_DEBUG_WARNING or MIRAGE_DEBUG_ERROR.

self :

a MIRAGE_Object

level :

debug level

format :

message format. See the printf() documentation.

... :

parameters to insert into the format string.

mirage_object_debug_messagev ()

void                mirage_object_debug_messagev        (MIRAGE_Object *self,
                                                         gint level,
                                                         gchar *format,
                                                         va_list args);

Outputs debug message with verbosity level level, format string format and format arguments args. The message is displayed if object's debug context has mask that covers level, or if level is either MIRAGE_DEBUG_WARNING or MIRAGE_DEBUG_ERROR.

self :

a MIRAGE_Object

level :

debug level

format :

message format. See the printf() documentation.

args :

parameters to insert into the format string.

mirage_object_set_mirage ()

gboolean            mirage_object_set_mirage            (MIRAGE_Object *self,
                                                         GObject *mirage,
                                                         GError **error);

Sets object's libMirage core object.

Note

Intended for internal use only.

self :

a MIRAGE_Object

mirage :

libMirage core object

error :

location to store error, or NULL

Returns :

TRUE on success, FALSE on failure

mirage_object_get_mirage ()

gboolean            mirage_object_get_mirage            (MIRAGE_Object *self,
                                                         GObject **mirage,
                                                         GError **error);

Retrieves object's libMirage core object. A reference to libMirage core object is stored in mirage; it should be released with g_object_unref() when no longer needed.

Note

Intented for internal use only.

self :

a MIRAGE_Object

mirage :

location to store libMirage core object, or NULL

error :

location to store error, or NULL

Returns :

TRUE on success, FALSE on failure

mirage_object_set_parent ()

gboolean            mirage_object_set_parent            (MIRAGE_Object *self,
                                                         GObject *parent,
                                                         GError **error);

Sets object's parent.

self :

a MIRAGE_Object

parent :

parent

error :

location to store error, or NULL

Returns :

TRUE on success, FALSE on failure

mirage_object_get_parent ()

gboolean            mirage_object_get_parent            (MIRAGE_Object *self,
                                                         GObject **parent,
                                                         GError **error);

Retrieves object's parent.

self :

a MIRAGE_Object

parent :

location to store parent, or NULL

error :

location to store error, or NULL

Returns :

TRUE on success, FALSE on failure

mirage_object_attach_child ()

gboolean            mirage_object_attach_child          (MIRAGE_Object *self,
                                                         GObject *child,
                                                         GError **error);

Attaches child to the object.

self :

a MIRAGE_Object

child :

child

error :

location to store error, or NULL

Returns :

TRUE on success, FALSE on failure

Signal Details

The "object-modified" signal

void                user_function                      (MIRAGE_Object *mirage_object,
                                                        gpointer       user_data)          : Has Details

Emitted each mirage_object is changed in a way that causes bottom-up change.

mirage_object :

the object which received the signal

user_data :

user data set when the signal handler was connected.

See Also

MIRAGE_Mirage, MIRAGE_DebugContext