GalagoObject

GalagoObject

Functions

Properties

gpointer context Read
GalagoOrigin origin Read / Write / Construct Only
gboolean supports-attrs Read

Signals

void destroy No Hooks

Types and Values

Object Hierarchy

    GObject
    ╰── GalagoObject
        ├── GalagoAccount
        ├── GalagoContext
        ├── GalagoCore
        ├── GalagoImage
        ├── GalagoPerson
        ├── GalagoPresence
        ├── GalagoService
        ╰── GalagoStatus

Description

Functions

GALAGO_OBJECT_HAS_FLAG()

#define             GALAGO_OBJECT_HAS_FLAG(obj, flag)

GALAGO_OBJECT_FLAGS()

#define GALAGO_OBJECT_FLAGS(obj) (GALAGO_OBJECT(obj)->flags)

GALAGO_OBJECT_SET_FLAGS()

#define             GALAGO_OBJECT_SET_FLAGS(obj, flag)

GALAGO_OBJECT_UNSET_FLAGS()

#define             GALAGO_OBJECT_UNSET_FLAGS(obj, flag)

GALAGO_ORIGIN_IS_VALID()

#define             GALAGO_ORIGIN_IS_VALID(origin)

GALAGO_OBJECT_IS_LOCAL()

#define             GALAGO_OBJECT_IS_LOCAL(obj)

GALAGO_OBJECT_IS_REMOTE()

#define             GALAGO_OBJECT_IS_REMOTE(obj)

galago_object_destroy ()

void
galago_object_destroy (GalagoObject *object);

Emits the "destroy" signal for an object, and attempts to dispose of it. The memory for the object won't actually be deleted until the reference count drops to 0.

Parameters

object

The object to destroy.

 

galago_object_type_get_dbus_signature ()

const gchar *
galago_object_type_get_dbus_signature (GType type);

Returns the D-BUS signature of the object type.

Parameters

type

The object GType.

 

Returns

The signature string, or NULL.


galago_object_set_dbus_path ()

void
galago_object_set_dbus_path (GalagoObject *object,
                             const gchar *obj_path);

Sets the D-BUS object path of an object.

Parameters

object

The object.

 

obj_path

The object path.

 

galago_object_get_dbus_path ()

const gchar *
galago_object_get_dbus_path (const GalagoObject *object);

Returns the D-BUS object path of an object.

Parameters

object

The object.

 

Returns

The object path.


galago_object_set_watch ()

void
galago_object_set_watch (GalagoObject *object,
                         gboolean watch);

Sets whether or not this object is watched for events.

Parameters

object

The object.

 

watch

TRUE if this object should be watched, or FALSE.

 

galago_object_is_watched ()

gboolean
galago_object_is_watched (const GalagoObject *object);

Returns whether or not an object is watched for events.

Parameters

object

The object.

 

Returns

TRUE if this object is being watched, or FALSE.


galago_object_get_origin ()

GalagoOrigin
galago_object_get_origin (const GalagoObject *object);

Returns the object's origin.

Parameters

object

The object.

 

Returns

The object's origin


galago_object_get_context ()

GalagoContext *
galago_object_get_context (const GalagoObject *object);

Returns the object's context.

Parameters

object

The object.

 

Returns

The object's context.


galago_object_set_attr_string ()

void
galago_object_set_attr_string (GalagoObject *object,
                               const char *name,
                               const char *value);

Sets a string attribute on an object.

Parameters

object

The object.

 

name

The name of the attribute to set.

 

value

The value of the attribute.

 

galago_object_set_attr_bool ()

void
galago_object_set_attr_bool (GalagoObject *object,
                             const char *name,
                             gboolean value);

Sets a boolean attribute on an object.

Parameters

object

The object.

 

name

The name of the attribute to set.

 

value

The value of the attribute.

 

galago_object_set_attr_int ()

void
galago_object_set_attr_int (GalagoObject *object,
                            const char *name,
                            gint32 value);

Sets an integer attribute on an object.

Parameters

object

The object.

 

name

The name of the attribute to set.

 

value

The value of the attribute.

 

galago_object_set_attr_double ()

void
galago_object_set_attr_double (GalagoObject *object,
                               const char *name,
                               gdouble value);

Sets a double attribute on an object.

Parameters

object

The object.

 

name

The name of the attribute to set.

 

value

The value of the attribute.

 

galago_object_set_attribute ()

void
galago_object_set_attribute (GalagoObject *object,
                             const char *name,
                             GValue *value);

Sets an attribute on an object.

This is limited to string, boolean, and integer value types.

Parameters

object

The object.

 

name

The name of the attribute to set.

 

value

The value of the attribute.

 

galago_object_remove_attribute ()

gboolean
galago_object_remove_attribute (GalagoObject *object,
                                const char *name);

Removes an attribute on an object.

Parameters

object

The object

 

name

The name of the attribute to remove

 

Returns

TRUE if the attribute was removed, or FALSE.


galago_object_get_attr_string ()

const char *
galago_object_get_attr_string (const GalagoObject *object,
                               const char *name);

Returns the value of a string attribute on an object.

Parameters

object

The object.

 

name

The name of the attribute.

 

Returns

The attribute value, or NULL.


galago_object_get_attr_bool ()

gboolean
galago_object_get_attr_bool (const GalagoObject *object,
                             const char *name);

Returns the value of a boolean attribute on an object.

Parameters

object

The object.

 

name

The name of the attribute.

 

Returns

The attribute value.


galago_object_get_attr_int ()

gint32
galago_object_get_attr_int (const GalagoObject *object,
                            const char *name);

Returns the value of an integer attribute on an object.

Parameters

object

The object.

 

name

The name of the attribute.

 

Returns

The attribute value.


galago_object_get_attr_double ()

gdouble
galago_object_get_attr_double (const GalagoObject *object,
                               const char *name);

Returns the value of a double attribute on an object.

Parameters

object

The object.

 

name

The name of the attribute.

 

Returns

The attribute value.


galago_object_get_attribute ()

const GValue *
galago_object_get_attribute (const GalagoObject *object,
                             const char *name);

Returns the value of an attribute on an object.

Parameters

object

The object.

 

name

The name of the attribute.

 

Returns

The attribute value, or NULL.


galago_object_get_has_attribute ()

gboolean
galago_object_get_has_attribute (const GalagoObject *object,
                                 const char *name);

Returns whether or not an object has a specific attribute set.

Parameters

object

The object.

 

name

The name of the attribute.

 

Returns

TRUE if the attribute is set, or FALSE.


galago_object_get_attributes ()

GList *
galago_object_get_attributes (const GalagoObject *object);

Returns the list of attributes in an object, represented by GalagoKeyValue structs.

Parameters

object

The object.

 

Returns

The attributes in the object. Each one is a GalagoKeyValue.

Types and Values

struct GalagoObject

struct GalagoObject;

enum GalagoObjectFlags

Members

GALAGO_OBJECT_IN_DESTRUCTION

   

GALAGO_OBJECT_RESERVED_1

   

GALAGO_OBJECT_RESERVED_2

   

enum GalagoOrigin

Members

GALAGO_LOCAL

   

GALAGO_REMOTE

   

Property Details

The “context” property

  “context”                  gpointer

The GalagoContext this object belongs to.

Owner: GalagoObject

Flags: Read


The “origin” property

  “origin”                   GalagoOrigin

The object's origin.

Owner: GalagoObject

Flags: Read / Write / Construct Only

Default value: GALAGO_LOCAL


The “supports-attrs” property

  “supports-attrs”           gboolean

Indicates if this object supports remote attributes.

Owner: GalagoObject

Flags: Read

Default value: FALSE

Signal Details

The “destroy” signal

void
user_function (GalagoObject *object,
               gpointer      user_data)

Emitted when the object is undergoing a dispose. Signals that anything holding a reference to this object should release the reference. This may or may not end with the object being finalized, depending on whether there are any references left after this is emitted.

Parameters

object

The object which received the signal.

 

user_data

user data set when the signal handler was connected.

 

Flags: No Hooks