summaryrefslogtreecommitdiff
path: root/bus/config-parser-trivial.c
diff options
context:
space:
mode:
Diffstat (limited to 'bus/config-parser-trivial.c')
-rw-r--r--bus/config-parser-trivial.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/bus/config-parser-trivial.c b/bus/config-parser-trivial.c
index fd016a84..59ec2ba2 100644
--- a/bus/config-parser-trivial.c
+++ b/bus/config-parser-trivial.c
@@ -22,6 +22,7 @@
*
*/
+#include <config.h>
#include "config-parser-common.h"
#include "config-parser-trivial.h"
#include "utils.h"
@@ -131,6 +132,25 @@ bus_config_parser_unref (BusConfigParser *parser)
}
dbus_bool_t
+bus_config_parser_check_doctype (BusConfigParser *parser,
+ const char *doctype,
+ DBusError *error)
+{
+ _DBUS_ASSERT_ERROR_IS_CLEAR (error);
+
+ if (strcmp (doctype, "busconfig") != 0)
+ {
+ dbus_set_error (error,
+ DBUS_ERROR_FAILED,
+ "Configuration file has the wrong document type %s",
+ doctype);
+ return FALSE;
+ }
+ else
+ return TRUE;
+}
+
+dbus_bool_t
bus_config_parser_start_element (BusConfigParser *parser,
const char *element_name,
const char **attribute_names,