source: branches/client-library-split/memphis-rule-set.h @ 101

Last change on this file since 101 was 101, checked in by simon, 5 years ago

rule-set: make debug_level private, add load functions

File size: 2.2 KB
Line 
1/*
2 * Memphis - Cairo Rederer for OSM in C
3 * Copyright (C) 2009  Simon Wenner <simon@wenner.ch>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library 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 GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18 */
19
20#ifndef _MEMPHIS_RULE_SET
21#define _MEMPHIS_RULE_SET
22
23#include <glib-object.h>
24#include "ruleset.h"
25
26G_BEGIN_DECLS
27
28#define MEMPHIS_TYPE_RULESET memphis_rule_set_get_type()
29
30#define MEMPHIS_RULESET(obj) \
31  (G_TYPE_CHECK_INSTANCE_CAST ((obj), MEMPHIS_TYPE_RULESET, MemphisRuleSet))
32
33#define MEMPHIS_RULESET_CLASS(klass) \
34  (G_TYPE_CHECK_CLASS_CAST ((klass), MEMPHIS_TYPE_RULESET, MemphisRuleSetClass))
35
36#define MEMPHIS_IS_RULESET(obj) \
37  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MEMPHIS_TYPE_RULESET))
38
39#define MEMPHIS_IS_RULESET_CLASS(klass) \
40  (G_TYPE_CHECK_CLASS_TYPE ((klass), MEMPHIS_TYPE_RULESET))
41
42#define MEMPHIS_RULESET_GET_CLASS(obj) \
43  (G_TYPE_INSTANCE_GET_CLASS ((obj), MEMPHIS_TYPE_RULESET, MemphisRuleSetClass))
44
45typedef struct {
46  GObject parent;
47  cfgRules *ruleset;
48} MemphisRuleSet;
49
50typedef struct {
51  GObjectClass parent_class;
52} MemphisRuleSetClass;
53
54GType memphis_rule_set_get_type (void);
55
56MemphisRuleSet* memphis_rule_set_new ();
57void memphis_rule_set_free (MemphisRuleSet* rules);
58
59void memphis_rule_set_load_from_file (MemphisRuleSet *rules,
60    gchar *filename);
61void memphis_rule_set_load_from_data (MemphisRuleSet *rules,
62    gchar *data);
63
64void memphis_rule_set_set_debug_level (MemphisRuleSet* rules,
65    gint8 debug_level);
66
67gint8 memphis_rule_set_get_debug_level (MemphisRuleSet* rules);
68
69G_END_DECLS
70
71#endif /* _MEMPHIS_RULE_SET */
72
Note: See TracBrowser for help on using the repository browser.