1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
4 * Copyright (C) 2010 Sébastien Granjoux
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public
17 * License along with this program; if not, write to the
18 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
22 #ifndef _COMMAND_QUEUE_H_
23 #define _COMMAND_QUEUE_H_
27 #include <glib-object.h>
29 #include <libanjuta/anjuta-project.h>
33 typedef struct _PmJob PmJob
;
35 typedef struct _PmCommandQueue PmCommandQueue
;
37 typedef gboolean (*PmCommandFunc
) (PmJob
*job
);
39 typedef struct _PmCommandWork
43 PmCommandFunc complete
;
49 AnjutaProjectNodeType type
;
52 AnjutaProjectNode
*node
;
53 AnjutaProjectNode
*sibling
;
54 AnjutaProjectNode
*parent
;
56 AnjutaProjectNode
*proxy
;
57 AnjutaProjectProperty
*property
;
62 PmJob
* pm_job_new (PmCommandWork
*work
, AnjutaProjectNode
*node
, AnjutaProjectNode
*parent
, AnjutaProjectNode
*sibling
, AnjutaProjectNodeType type
, GFile
*file
, const gchar
*name
, gpointer user_data
);
63 void pm_job_free (PmJob
*job
);
64 void pm_job_set_parent (PmJob
*job
, AnjutaProjectNode
*parent
);
66 PmCommandQueue
* pm_command_queue_new (void);
67 void pm_command_queue_free (PmCommandQueue
*queue
);
69 void pm_command_queue_push (PmCommandQueue
*queue
, PmJob
*job
);
70 gboolean
pm_command_queue_is_busy (PmCommandQueue
*queue
);
75 #endif /* _COMMAND_QUEUE_H_ */