jbsrc/lib/src/core/jb-group.h (2628B) - raw
1 /* 2 * JB, the Jean-Yves Lefort's Build System 3 * Copyright (C) 2008 Jean-Yves Lefort <jylefort@brutele.be> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 3 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License along 16 * with this program; if not, write to the Free Software Foundation, Inc., 17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 */ 19 20 #ifndef _JB_GROUP_H 21 #define _JB_GROUP_H 22 23 #include <stdarg.h> 24 #include <glib-object.h> 25 #include "jb-decls.h" 26 #include "jb-util.h" 27 #include "jb-compile-options.h" 28 29 #define JB_TYPE_GROUP (jb_group_get_type()) 30 #define JB_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), JB_TYPE_GROUP, JBGroup)) 31 #define JB_IS_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), JB_TYPE_GROUP)) 32 33 struct JBGroup 34 { 35 GObject parent; 36 37 char *name; 38 39 char *srcdir; 40 char *builddir; 41 42 JBCompileOptions *compile_options; 43 44 GSList *resources; 45 }; 46 47 typedef struct 48 { 49 GObjectClass parent_class; 50 } JBGroupClass; 51 52 extern GSList *jb_groups; 53 54 extern JBStringHashSet *jb_templates; 55 56 GType jb_group_get_type (void); 57 58 JBGroup *jb_group_new (const char *name); 59 60 void jb_group_add (JBGroup *group); 61 62 JBGroup *jb_group_get (const char *name); 63 64 void jb_group_add_resource (JBGroup *self, JBGroupResource *res); 65 66 void jb_group_add_data_file (JBGroup *self, 67 const char *file, 68 const char *installdir); 69 void jb_group_add_data_files (JBGroup *self, const char *file, ...) G_GNUC_NULL_TERMINATED; 70 void jb_group_add_data_files_list (JBGroup *self, 71 GSList *files, 72 const char *installdir); 73 void jb_group_add_data_files_pattern (JBGroup *self, 74 const char *pattern, 75 const char *installdir); 76 77 void jb_group_add_dist_file (JBGroup *self, const char *file); 78 void jb_group_add_dist_files (JBGroup *self, const char *file, ...) G_GNUC_NULL_TERMINATED; 79 80 void jb_group_add_desktop_file (JBGroup *self, 81 const char *filename, 82 const char *installdir); 83 84 void jb_group_add_gconf_schemas (JBGroup *self, const char *filename); 85 86 void jb_group_add_bonobo_server (JBGroup *self, const char *filename); 87 88 void jb_group_add_translations (JBGroup *self, const char *languages); 89 90 #endif /* _JB_GROUP_H */