## MrpType

MrpType — miscellaneous declarations.

## Functions

GList * | mrp_string_list_copy ()
void | mrp_string_list_free ()

## Properties

MrpResource * | resource | Read / Write
MrpTask * | task | Read / Write
int | units | Read / Write
char * | manager-email | Read / Write
char * | manager-name | Read / Write
char * | manager-phone | Read / Write
char * | name | Read / Write
gpointer | calendar | Read / Write
float | cost | Read / Write
char * | email | Read / Write
MrpGroup * | group | Read / Write
char * | name | Read / Write
char * | note | Read / Write
char * | short-name | Read / Write
int | type | Read / Write
int | units | Read / Write
MrpConstraint * | constraint | Read / Write
gboolean | critical | Read / Write
int | duration | Read / Write
gint64 | finish | Read
gint64 | latest-finish | Read
gint64 | latest-start | Read
char * | name | Read / Write
char * | note | Read / Write
int | percent-complete | Read / Write
int | priority | Read / Write
MrpTaskSched | sched | Read / Write
gint64 | start | Read
MrpTaskType | type | Read / Write
int | work | Read / Write

## Signals

void | assignment-added | Run Last
void | assignment-removed | Run Last
void | assignment-added | Run Last
void | assignment-removed | Run Last
void | child-added | Run Last
void | child-removed | Run Last
void | relation-added | Run Last
void | relation-removed | Run Last
void | task-moved | Run Last

## Types and Values

#define | MRP_TYPE_STRING_LIST
enum | MrpRelationType
enum | MrpConstraintType
| MrpConstraint
enum | MrpTaskType
enum | MrpTaskSched
| MrpAssignment
| MrpGroup
| MrpResource
| MrpTask

## Object Hierarchy

        GBoxed
        ╰── MrpConstraint
        GEnum
        ├── MrpRelationType
        ├── MrpTaskSched
        ╰── MrpTaskType
        GObject
        ╰── MrpObject
            ├── MrpAssignment
            ├── MrpGroup
            ├── MrpResource
            ╰── MrpTask

## Includes

    #include <libplanner/mrp-types.h>

## Description

Miscellaneous declarations.

## Functions

### mrp_string_list_copy ()

    GList *
    mrp_string_list_copy (const GList *list);

Copy a list of strings.

#### Parameters

list | a list. |

#### Returns

a copy.

### mrp_string_list_free ()

    void
    mrp_string_list_free (GList *list);

Free a list of strings.

#### Parameters

list | a list |

## Types and Values

### MRP_TYPE_STRING_LIST

    #define MRP_TYPE_STRING_LIST   (mrp_string_list_get_type ())

### enum MrpRelationType

The type of relation.

#### Members

MRP_RELATION_NONE | invalid relation type (unset) |
MRP_RELATION_FS | finish to start |
MRP_RELATION_FF | finish to finish (unimplemented) |
MRP_RELATION_SS | start to start (unimplemented) |
MRP_RELATION_SF | start to finish (unimplemented) |

### enum MrpConstraintType

The type of constraint for the task. The default is MRP_CONSTRAINT_ASAP.

#### Members

MRP_CONSTRAINT_ASAP | as soon as possible (default) |
MRP_CONSTRAINT_ALAP | as late as possible (unimplemented) |
MRP_CONSTRAINT_SNET | start no earlier than |
MRP_CONSTRAINT_FNLT | finish no later than (unimplemented) |
MRP_CONSTRAINT_MSO | must start on |

### MrpConstraint

    typedef struct {
    	MrpConstraintType type;
    	mrptime           time;
    } MrpConstraint;

A struct representing a scheduling constraint on a task.

#### Members

MrpConstraintType `type`; | a constraint type. |
mrptime `time`; | a time. |

### enum MrpTaskType

Task types.

#### Members

MRP_TASK_TYPE_NORMAL | normal |
MRP_TASK_TYPE_MILESTONE | milestone |

### enum MrpTaskSched

Task scheduling types.

#### Members

MRP_TASK_SCHED_FIXED_WORK | fixed work |
MRP_TASK_SCHED_FIXED_DURATION | fixed duration |

### MrpAssignment

    typedef struct _MrpAssignment MrpAssignment;

Represents an assignment, i.e. the assignment of a task to a resource.

### MrpGroup

    typedef struct _MrpGroup MrpGroup;

Object representing a resource group.

### MrpResource

    typedef struct _MrpResource MrpResource;

Object representing a resource in the project.

### MrpTask

    typedef struct _MrpTask MrpTask;

Object representing a task in the project.

## Property Details

### The `“resource”` property

      “resource”                 MrpResource *

The resource that is assigned to the task.

Owner: MrpAssignment

Flags: Read / Write

### The `“task”` property

      “task”                     MrpTask *

The task.

Owner: MrpAssignment

Flags: Read / Write

### The `“units”` property

      “units”                    int

Number of units assignment.

Owner: MrpAssignment

Flags: Read / Write

Allowed values: >= -1

Default value: 0

### The `“manager-email”` property

      “manager-email”            char *

The email address of the group manager.

Owner: MrpGroup

Flags: Read / Write

Default value: "empty"

### The `“manager-name”` property

      “manager-name”             char *

The name of the group manager.

Owner: MrpGroup

Flags: Read / Write

Default value: "empty"

### The `“manager-phone”` property

      “manager-phone”            char *

The phone number of the group manager.

Owner: MrpGroup

Flags: Read / Write

Default value: "empty"

### The `“name”` property

      “name”                     char *

Name of the group.

Owner: MrpGroup

Flags: Read / Write

Default value: "empty"

### The `“calendar”` property

      “calendar”                 gpointer

The calendar this resource uses.

Owner: MrpResource

Flags: Read / Write

### The `“cost”` property

      “cost”                     float

The standard cost of the resource.

Owner: MrpResource

Flags: Read / Write

Allowed values: >= 0

Default value: 0

### The `“email”` property

      “email”                    char *

The email address of the resource.

Owner: MrpResource

Flags: Read / Write

Default value: NULL

### The `“group”` property

      “group”                    MrpGroup *

The group that the resource belongs to.

Owner: MrpResource

Flags: Read / Write

### The `“name”` property

      “name”                     char *

The name of the resource.

Owner: MrpResource

Flags: Read / Write

Default value: NULL

### The `“note”` property

      “note”                     char *

Resource note.

Owner: MrpResource

Flags: Read / Write

Default value: ""

### The `“short-name”` property

      “short-name”               char *

The shorter name, initials or nickname of the resource.

Owner: MrpResource

Flags: Read / Write

Default value: NULL

### The `“type”` property

      “type”                     int

The type of resource this is.

Owner: MrpResource

Flags: Read / Write

Allowed values: [0,2]

Default value: 1

### The `“units”` property

      “units”                    int

The amount of units this resource has.

Owner: MrpResource

Flags: Read / Write

Allowed values: >= -1

Default value: 0

### The `“constraint”` property

      “constraint”               MrpConstraint *

Task scheduling constraint.

Owner: MrpTask

Flags: Read / Write

### The `“critical”` property

      “critical”                 gboolean

In critical path.

Owner: MrpTask

Flags: Read / Write

Default value: FALSE

### The `“duration”` property

      “duration”                 int

Duration of the task.

Owner: MrpTask

Flags: Read / Write

Allowed values: >= -1

Default value: 0

### The `“finish”` property

      “finish”                   gint64

Task finish time.

Owner: MrpTask

Flags: Read

Allowed values: [0,253402300799]

Default value: 0

### The `“latest-finish”` property

      “latest-finish”            gint64

Latest task finish time.

Owner: MrpTask

Flags: Read

Allowed values: [0,253402300799]

Default value: 0

### The `“latest-start”` property

      “latest-start”             gint64

Latest task start time.

Owner: MrpTask

Flags: Read

Allowed values: [0,253402300799]

Default value: 0

### The `“name”` property

      “name”                     char *

Name of the task.

Owner: MrpTask

Flags: Read / Write

Default value: ""

### The `“note”` property

      “note”                     char *

Note attached to the task.

Owner: MrpTask

Flags: Read / Write

Default value: ""

### The `“percent-complete”` property

      “percent-complete”         int

Percent completed of task.

Owner: MrpTask

Flags: Read / Write

Allowed values: [0,100]

Default value: 0

### The `“priority”` property

      “priority”                 int

Priority of the task.

Owner: MrpTask

Flags: Read / Write

Allowed values: [0,9999]

Default value: 0

### The `“sched”` property

      “sched”                    MrpTaskSched

Task scheduling type.

Owner: MrpTask

Flags: Read / Write

Default value: MRP_TASK_SCHED_FIXED_WORK

### The `“start”` property

      “start”                    gint64

Task Start time.

Owner: MrpTask

Flags: Read

Allowed values: [0,253402300799]

Default value: 0

### The `“type”` property

      “type”                     MrpTaskType

Task type.

Owner: MrpTask

Flags: Read / Write

Default value: MRP_TASK_TYPE_NORMAL

### The `“work”` property

      “work”                     int

Task work.

Owner: MrpTask

Flags: Read / Write

Allowed values: >= -1

Default value: 0

## Signal Details

### The `“assignment-added”` signal

    void
    user_function (MrpResource   *resource,
                   MrpAssignment *assignment,
                   gpointer       user_data)

emitted when `assignment` is added.

#### Parameters

resource | the object which received the signal. |
assignment | the added MrpAssignment. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“assignment-removed”` signal

    void
    user_function (MrpResource   *resource,
                   MrpAssignment *assignment,
                   gpointer       user_data)

emitted when `assignment` is removed.

#### Parameters

resource | the object which received the signal. |
assignment | the removed MrpAssignment. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“assignment-added”` signal

    void
    user_function (MrpTask       *task,
                   MrpAssignment *assignment,
                   gpointer       user_data)

emitted when `assignment` is added.

#### Parameters

task | the object which received the signal. |
assignment | the added MrpAssignment. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“assignment-removed”` signal

    void
    user_function (MrpTask       *task,
                   MrpAssignment *assignment,
                   gpointer       user_data)

emitted when `assignment` is removed.

#### Parameters

task | the object which received the signal. |
assignment | the removed MrpAssignment. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“child-added”` signal

    void
    user_function (MrpTask *task,
                   gpointer user_data)

emitted when a child is added.

#### Parameters

task | the object which received the signal. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“child-removed”` signal

    void
    user_function (MrpTask *task,
                   gpointer user_data)

emitted when a child is removed.

#### Parameters

task | the object which received the signal. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“relation-added”` signal

    void
    user_function (MrpTask *task,
                   gpointer relation,
                   gpointer user_data)

emitted when `relation` is added.

#### Parameters

task | the object which received the signal. |
relation | the added MrpRelation. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“relation-removed”` signal

    void
    user_function (MrpTask *task,
                   gpointer relation,
                   gpointer user_data)

emitted when `relation` is removed.

#### Parameters

task | the object which received the signal. |
relation | the removed MrpRelation |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“task-moved”` signal

    void
    user_function (MrpTask *task,
                   MrpTask *other_task,
                   int      arg2,
                   gpointer user_data)

emitted when `other_task` is moved.

#### Parameters

task | the object which received the signal. |
other_task | another MrpTask. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last