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 ()

## Properties

gboolean | loading | Read
char * | 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` |

## 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 `“loading”` property

      “loading”                  gboolean

Whether the object is loading or not.

Owner: GtdObject

Flags: Read

Default value: TRUE

### The `“uid”` property

      “uid”                      char *

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

Owner: GtdObject

Flags: Read / Write / Construct

Default value: NULL