GtdObject: GNOME To Do - Reference Manual

## GtdObject GtdObject — base class for loadable and uniquely identifiable objects |

## Functions

GtdObject * | gtd_object_new ()
const gchar * | gtd_object_get_uid ()
void | gtd_object_set_uid ()
gboolean | gtd_object_get_ready ()
void | gtd_object_set_ready ()

## Properties

gboolean | ready | Read / Write
gchar * | uid | Read / Write / Construct

## Types and Values

#define | GTD_TYPE_OBJECT
struct | GtdObjectClass
| GtdObject

## Object Hierarchy

        GObject
        ╰── GtdObject
            ├── GtdManager
            ├── GtdNotification
            ├── GtdTask
            ╰── GtdTaskList

## Known Derived Interfaces

GtdObject is required by GtdProvider.

## Description

GtdObject is the base class of many object in GNOME To Do, and it useful for when a given object is loadable and/or uniquely identifiable. Some examples of it are GtdTask, GtdTaskList and GtdNotification.

## Functions

### gtd_object_new ()

    GtdObject *
    gtd_object_new (const gchar *uid);

Creates a new GtdObject object.

#### Parameters

uid | unique identifier of the object |

#### Returns

a new GtdObject.

[transfer full]

### gtd_object_get_uid ()

    const gchar *
    gtd_object_get_uid (GtdObject *object);

Retrieves the internal unique identifier of `object` .

#### Parameters

object | a GtdObject |

#### Returns

the unique identifier of `object` . Do not free after usage.

[transfer none]

### gtd_object_set_uid ()

    void
    gtd_object_set_uid (GtdObject *object,
                        const gchar *uid);

Sets the unique identifier of `object` to `uid` . Only a GtdBackend should do it.

#### Parameters

object | a GtdObject |
uid | the unique identifier of `object` |

### gtd_object_get_ready ()

    gboolean
    gtd_object_get_ready (GtdObject *object);

Whether `object` is ready.

#### Parameters

object | a GtdObject |

#### Returns

`TRUE` if `object` is ready, `FALSE` otherwise.

### gtd_object_set_ready ()

    void
    gtd_object_set_ready (GtdObject *object,
                          gboolean ready);

Sets the GtdObject::ready property to `ready` .

#### Parameters

object | a GtdObject |
ready | whether `object` is ready or not |

## Types and Values

### GTD_TYPE_OBJECT

    #define GTD_TYPE_OBJECT (gtd_object_get_type())

### struct GtdObjectClass

    struct GtdObjectClass {
      GObjectClass parent;

      /* public */
      const gchar*      (* get_uid)        (GtdObject        *object);
      void              (* set_uid)        (GtdObject        *object,
                                            const gchar      *uid);
    };

### GtdObject

    typedef struct _GtdObject GtdObject;

## Property Details

### The `“ready”` property

      “ready”                    gboolean

Whether the object is marked as ready or not.

Flags: Read / Write

Default value: TRUE

### The `“uid”` property

      “uid”                      gchar *

The unique identifier of the object, defined by the backend.

Flags: Read / Write / Construct

Default value: NULL