}
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,
{
case ELEMENT_SERVICEHELPER:
case ELEMENT_USER:
- case ELEMENT_TYPE:
+ case ELEMENT_CONFIGTYPE:
/* content about to be handled */
break;
default:
{
/* we really don't care about the others... */
- _dbus_verbose (" START We dont care about '%s' type '%i'\n", element_name, parser->type);
+ _dbus_verbose (" START We don't care about '%s' type '%i'\n", element_name, parser->type);
break;
}
}
}
break;
- case ELEMENT_TYPE:
+ case ELEMENT_CONFIGTYPE:
{
if (!_dbus_string_copy (&content_sane, 0, &parser->bus_type, 0))
{
default:
{
/* we don't care about the others... really */
- _dbus_verbose (" CONTENTS We dont care '%s' type '%i'\n", _dbus_string_get_const_data (&content_sane), parser->type);
+ _dbus_verbose (" CONTENTS We don't care about '%s' type '%i'\n", _dbus_string_get_const_data (&content_sane), parser->type);
break;
}
}
return &parser->service_dirs;
}
-#ifdef DBUS_BUILD_TESTS
+#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#include <stdio.h>
#include "test.h"
return retval;
}
-#endif /* DBUS_BUILD_TESTS */
+#endif /* DBUS_ENABLE_EMBEDDED_TESTS */