* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-
#include "config-parser.h"
+#include "test.h"
+#include <dbus/dbus-list.h>
+#include <dbus/dbus-internals.h>
#include <string.h>
typedef enum
{
int refcount;
- DBusList *stack;
+ DBusList *stack; /**< stack of Element */
+
+ char *user; /**< user to run as */
};
+
+static Element*
+push_element (BusConfigParser *parser,
+ ElementType type)
+{
+ Element *e;
+
+ e = dbus_new0 (Element, 1);
+ if (e == NULL)
+ return NULL;
+
+ e->type = type;
+
+ return e;
+}
+
+static void
+pop_element (BusConfigParser *parser)
+{
+ Element *e;
+
+ e = _dbus_list_pop_last (&parser->stack);
+
+ dbus_free (e);
+}
+
BusConfigParser*
bus_config_parser_new (void)
{
if (parser->refcount == 0)
{
-
+ while (parser->stack != NULL)
+ pop_element (parser);
+
+ dbus_free (parser->user);
dbus_free (parser);
}
const char *doctype,
DBusError *error)
{
+ _DBUS_ASSERT_ERROR_IS_CLEAR (error);
+
if (strcmp (doctype, "busconfig") != 0)
{
dbus_set_error (error,
const char **attribute_values,
DBusError *error)
{
-
+ _DBUS_ASSERT_ERROR_IS_CLEAR (error);
}
const char *element_name,
DBusError *error)
{
-
+ _DBUS_ASSERT_ERROR_IS_CLEAR (error);
}
const DBusString *content,
DBusError *error)
{
-
+ _DBUS_ASSERT_ERROR_IS_CLEAR (error);
+
+}
+
+dbus_bool_t
+bus_config_parser_finished (BusConfigParser *parser,
+ DBusError *error)
+{
+ _DBUS_ASSERT_ERROR_IS_CLEAR (error);
+
+}
+
+const char*
+bus_config_parser_get_user (BusConfigParser *parser)
+{
+
}
+#ifdef DBUS_BUILD_TESTS
+
+dbus_bool_t
+bus_config_parser_test (const DBusString *test_data_dir)
+{
+
+ return TRUE;
+}
+
+#endif /* DBUS_BUILD_TESTS */
+