## mrpday

mrpday — represents a day type in the project.

## Synopsis

    #include <libplanner/planner.h>

                        MrpDay;
    MrpDay *            mrp_day_add                         (MrpProject *project,
                                                             const gchar *name,
                                                             const gchar *description);
    GList *             mrp_day_get_all                     (MrpProject *project);
    void                mrp_day_remove                      (MrpProject *project,
                                                             MrpDay *day);
    gint                mrp_day_get_id                      (MrpDay *day);
    const gchar *       mrp_day_get_name                    (MrpDay *day);
    void                mrp_day_set_name                    (MrpDay *day,
                                                             const gchar *name);
    const gchar *       mrp_day_get_description             (MrpDay *day);
    void                mrp_day_set_description             (MrpDay *day,
                                                             const gchar *description);
    MrpDay *            mrp_day_ref                         (MrpDay *day);
    void                mrp_day_unref                       (MrpDay *day);
    MrpDay *            mrp_day_get_work                    (void);
    MrpDay *            mrp_day_get_nonwork                 (void);
    MrpDay *            mrp_day_get_use_base                (void);

## Description

A day is a specific type of day, such as working day or non-working day. Other examples might be custom types like half day, or a holiday.

## Details

### MrpDay

    typedef struct _MrpDay MrpDay;

Object representing a day in the project.

### mrp_day_add ()

    MrpDay *            mrp_day_add                         (MrpProject *project,
                                                             const gchar *name,
                                                             const gchar *description);

Adds a new day type to `project`.

`project` : | an MrpProject
`name` : | the name of the day type
`description` : | human readable description of the day type
Returns : | the newly created MrpDay

### mrp_day_get_all ()

    GList *             mrp_day_get_all                     (MrpProject *project);

Fetches a list of all available day types in `project`.

`project` : | an MrpProject
Returns : | the list of all available day types in `project`

### mrp_day_remove ()

    void                mrp_day_remove                      (MrpProject *project,
                                                             MrpDay *day);

Remove `day` from available day types in `project`

`project` : | an MrpProject
`day` : | an MrpDay

### mrp_day_get_id ()

    gint                mrp_day_get_id                      (MrpDay *day);

Fetches the id of `day`

`day` : | an MrpDay
Returns : | the id of `day`

### mrp_day_get_name ()

    const gchar *       mrp_day_get_name                    (MrpDay *day);

Fetches the name of `day`

`day` : | an MrpDay
Returns : | the name of `day`

### mrp_day_set_name ()

    void                mrp_day_set_name                    (MrpDay *day,
                                                             const gchar *name);

Sets the name of `day` to `name` and emits the "day-changed" signal

`day` : | an MrpDay
`name` : | the new name

### mrp_day_get_description ()

    const gchar *       mrp_day_get_description             (MrpDay *day);

Fetches the description of `day`

`day` : | an MrpDay
Returns : | the description of `day`

### mrp_day_set_description ()

    void                mrp_day_set_description             (MrpDay *day,
                                                             const gchar *description);

Sets the description of `day` to `description` and emits the "day-changed" signal

`day` : | an MrpDay
`description` : | the new description

### mrp_day_ref ()

    MrpDay *            mrp_day_ref                         (MrpDay *day);

Add a reference to `day`. User should call this when storing a reference to a day.

`day` : | MrpDay
Returns : | the day

### mrp_day_unref ()

    void                mrp_day_unref                       (MrpDay *day);

Remove a reference from property. If the reference count reaches 0 the property will be freed. User should not use it's reference after calling `mrp_day_unref()`.

`day` : | an MrpDay

### mrp_day_get_work ()

    MrpDay *            mrp_day_get_work                    (void);

Fetches the builtin day type work.

Returns : | the builtin day type work

### mrp_day_get_nonwork ()

    MrpDay *            mrp_day_get_nonwork                 (void);

Fetches the builtin day type nonwork.

Returns : | the builtin day type nowork

### mrp_day_get_use_base ()

    MrpDay *            mrp_day_get_use_base                (void);

Fetches the builtin day type user base

Returns : | the builtin day type use base