Base the task model around an auth object, so we can make the model reflect the
[milk] / src / milk-task-model.h
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License as
4  * published by the Free Software Foundation; either version 2 of the
5  * License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10  * General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public
13  * License along with this program; if not, write to the
14  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
15  * Boston, MA  02110-1301  USA
16  *
17  * Authors: Travis Reitter <treitter@gmail.com>
18  */
19
20 #ifndef _MILK_TASK_MODEL_H
21 #define _MILK_TASK_MODEL_H
22
23 #include "milk-auth.h"
24
25 G_BEGIN_DECLS
26
27 #define MILK_TYPE_TASK_MODEL milk_task_model_get_type()
28
29 #define MILK_TASK_MODEL(obj) \
30                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
31                 MILK_TYPE_TASK_MODEL, MilkTaskModel))
32
33 #define MILK_TASK_MODEL_CLASS(klass) \
34                 (G_TYPE_CHECK_CLASS_CAST ((klass), \
35                 MILK_TYPE_TASK_MODEL, MilkTaskModelClass))
36
37 #define MILK_IS_TASK_MODEL(obj) \
38                 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
39                 MILK_TYPE_TASK_MODEL))
40
41 #define MILK_IS_TASK_MODEL_CLASS(klass) \
42                 (G_TYPE_CHECK_CLASS_TYPE ((klass), \
43                 MILK_TYPE_TASK_MODEL))
44
45 #define MILK_TASK_MODEL_GET_CLASS(obj) \
46                 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
47                 MILK_TYPE_TASK_MODEL, MilkTaskModelClass))
48
49 typedef struct _MilkTaskModel MilkTaskModel;
50 typedef struct _MilkTaskModelClass MilkTaskModelClass;
51 typedef struct _MilkTaskModelPrivate MilkTaskModelPrivate;
52
53 typedef enum {
54         MILK_TASK_MODEL_COLUMN_TASK,
55         MILK_TASK_MODEL_N_COLUMNS
56 } MilkTaskModelColumn;
57
58 struct _MilkTaskModel
59 {
60         GObject parent;
61         MilkTaskModelPrivate *priv;
62 };
63
64 struct _MilkTaskModelClass
65 {
66         GObjectClass parent_class;
67 };
68
69 GType milk_task_model_get_type (void);
70
71
72 MilkTaskModel* milk_task_model_new (MilkAuth *auth);
73 void milk_task_model_set_auth (MilkTaskModel *model, MilkAuth *auth);
74
75
76 #endif /* _MILK_TASK_MODEL_H */