Updated Spanish translation
[anjuta.git] / plugins / am-project / command-queue.h
blobf93fc70f6810b123b280a880281eae393ce477df
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
2 /* command-queue.h
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_
25 #include <glib.h>
26 #include <gio/gio.h>
27 #include <glib-object.h>
29 #include <libanjuta/anjuta-project.h>
31 G_BEGIN_DECLS
33 typedef struct _PmJob PmJob;
35 typedef struct _PmCommandQueue PmCommandQueue;
37 typedef gboolean (*PmCommandFunc) (PmJob *job);
39 typedef struct _PmCommandWork
41 PmCommandFunc setup;
42 PmCommandFunc worker;
43 PmCommandFunc complete;
44 } PmCommandWork;
46 struct _PmJob
48 PmCommandWork *work;
49 AnjutaProjectNodeType type;
50 GFile *file;
51 gchar *name;
52 AnjutaProjectNode *node;
53 AnjutaProjectNode *sibling;
54 AnjutaProjectNode *parent;
55 GError *error;
56 AnjutaProjectNode *proxy;
57 AnjutaProjectProperty *property;
58 GHashTable *map;
59 gpointer user_data;
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);
73 G_END_DECLS
75 #endif /* _COMMAND_QUEUE_H_ */