File: mrp-types.h

package info (click to toggle)
planner 0.14.6-9
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 14,988 kB
  • sloc: ansic: 67,169; sh: 10,242; xml: 3,928; sql: 886; makefile: 694; python: 33
file content (94 lines) | stat: -rw-r--r-- 2,929 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
 * Copyright (C) 2001-2003 CodeFactory AB
 * Copyright (C) 2001-2003 Richard Hult <richard@imendio.com>
 * Copyright (C) 2001-2002 Mikael Hallendal <micke@imendio.com>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#ifndef __MRP_TYPES_H__
#define __MRP_TYPES_H__

#include <libplanner/mrp-time.h>

#define MRP_TYPE_RELATION_TYPE (mrp_relation_type_get_type ())
#define MRP_TYPE_TASK_TYPE     (mrp_task_type_get_type ())
#define MRP_TYPE_TASK_SCHED    (mrp_task_sched_get_type ())
#define MRP_TYPE_PROPERTY_TYPE (mrp_property_type_get_type ())
#define MRP_TYPE_STRING_LIST   (mrp_string_list_get_type ())

typedef enum {
	MRP_RELATION_NONE = 0, /* unset */
	MRP_RELATION_FS,       /* finish-to-start */
	MRP_RELATION_FF,       /* finish-to-finish */
	MRP_RELATION_SS,       /* start-to-start */
	MRP_RELATION_SF        /* start-to-finish */
} MrpRelationType;

typedef enum {
	MRP_CONSTRAINT_ASAP = 0, /* as-soon-as-possible */
	MRP_CONSTRAINT_ALAP,     /* as-late-as-possible */
	MRP_CONSTRAINT_SNET,     /* start-no-earlier-than */
	MRP_CONSTRAINT_FNLT,     /* finish-no-later-than */
	MRP_CONSTRAINT_MSO,      /* must-start-on */
} MrpConstraintType;

struct _MrpConstraint {
	MrpConstraintType type;
	mrptime           time;
};

typedef enum {
	MRP_TASK_TYPE_NORMAL,
	MRP_TASK_TYPE_MILESTONE
} MrpTaskType;

typedef enum {
	MRP_TASK_SCHED_FIXED_WORK,
	MRP_TASK_SCHED_FIXED_DURATION
} MrpTaskSched;


typedef struct _MrpTask       MrpTask;
typedef struct _MrpResource   MrpResource;
typedef struct _MrpGroup      MrpGroup;
typedef struct _MrpAssignment MrpAssignment;
typedef struct _MrpConstraint MrpConstraint;

GType   mrp_relation_type_get_type (void) G_GNUC_CONST;

GType   mrp_task_type_get_type     (void) G_GNUC_CONST;

GType   mrp_task_sched_get_type    (void) G_GNUC_CONST;

GType   mrp_property_type_get_type (void) G_GNUC_CONST;

/**
 * mrp_string_list_copy:
 * @list: (element-type utf8):
 *
 * Return value: (element-type utf8) (transfer full):
 */
GList * mrp_string_list_copy       (const GList *list);

/**
 * mrp_string_list_free:
 * @list: (element-type utf8):
 */
void    mrp_string_list_free       (GList       *list);

#endif /* __MRP_TYPES_H__ */