2 * AnjutaPluginDescription - Plugin meta data
3 * anjuta-plugin-description.h Copyright (C) 2002 Red Hat, Inc.
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 of the License, or (at your option) any later version.
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.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
21 #ifndef ANJUTA_PLUGIN_PARSER_H
22 #define ANJUTA_PLUGIN_PARSER_H
28 typedef struct _AnjutaPluginDescription AnjutaPluginDescription
;
30 typedef void (*AnjutaPluginDescriptionSectionFunc
) (AnjutaPluginDescription
*df
,
34 /* If @key is %NULL, @value is a comment line. */
35 /* @value is raw, unescaped data. */
36 typedef void (*AnjutaPluginDescriptionLineFunc
) (AnjutaPluginDescription
*df
,
43 * AnjutaPluginDescriptionParseError:
44 * @ANJUTA_PLUGIN_DESCRIPTION_PARSE_ERROR_INVALID_SYNTAX: Syntax of plugin file is invalid
45 * @ANJUTA_PLUGIN_DESCRIPTION_PARSE_ERROR_INVALID_ESCAPES: Invalid escape sequence
46 * @ANJUTA_PLUGIN_DESCRIPTION_PARSE_ERROR_INVALID_CHARS: Invalid characters
48 * Possible errors when parsing a plugin file
52 ANJUTA_PLUGIN_DESCRIPTION_PARSE_ERROR_INVALID_SYNTAX
,
53 ANJUTA_PLUGIN_DESCRIPTION_PARSE_ERROR_INVALID_ESCAPES
,
54 ANJUTA_PLUGIN_DESCRIPTION_PARSE_ERROR_INVALID_CHARS
55 } AnjutaPluginDescriptionParseError
;
57 #define ANJUTA_PLUGIN_DESCRIPTION_PARSE_ERROR \
58 anjuta_plugin_description_parse_error_quark()
60 GQuark
anjuta_plugin_description_parse_error_quark (void);
63 AnjutaPluginDescription
* anjuta_plugin_description_new (const gchar
*filename
,
66 AnjutaPluginDescription
* anjuta_plugin_description_new_from_string (gchar
*data
,
69 gchar
* anjuta_plugin_description_to_string (AnjutaPluginDescription
*df
);
71 void anjuta_plugin_description_free (AnjutaPluginDescription
*df
);
73 void anjuta_plugin_description_foreach_section (AnjutaPluginDescription
*df
,
74 AnjutaPluginDescriptionSectionFunc func
,
77 void anjuta_plugin_description_foreach_key (AnjutaPluginDescription
*df
,
78 const gchar
*section_name
,
79 gboolean include_localized
,
80 AnjutaPluginDescriptionLineFunc func
,
83 /* Gets the raw text of the key, unescaped */
84 gboolean
anjuta_plugin_description_get_raw (AnjutaPluginDescription
*df
,
85 const gchar
*section_name
,
90 gboolean
anjuta_plugin_description_get_integer (AnjutaPluginDescription
*df
,
95 gboolean
anjuta_plugin_description_get_boolean (AnjutaPluginDescription
*df
,
100 gboolean
anjuta_plugin_description_get_string (AnjutaPluginDescription
*df
,
101 const gchar
*section
,
102 const gchar
*keyname
,
105 gboolean
anjuta_plugin_description_get_locale_string (AnjutaPluginDescription
*df
,
106 const gchar
*section
,
107 const gchar
*keyname
,
111 #endif /* ANJUTA_PLUGIN_PARSER_H */