summaryrefslogtreecommitdiff
path: root/include/dom/core
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2010-12-05 23:52:56 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2010-12-05 23:52:56 +0000
commitac42344d05ec326f0063133498ec1c040e924db2 (patch)
tree4041bc41d72721a94dc573e5be3cb0f80988e004 /include/dom/core
parentc9c2a632f38b736d6879caf00aa477ecf2e22dfb (diff)
downloadlibdom-ac42344d05ec326f0063133498ec1c040e924db2.tar.gz
libdom-ac42344d05ec326f0063133498ec1c040e924db2.tar.bz2
Remove bootstrap infrastructure, and just make dom_implementation a stub.
We only support a single implementation, so all the registry and implementation list stuff is totally unnecesary and overcomplex svn path=/trunk/dom/; revision=11017
Diffstat (limited to 'include/dom/core')
-rw-r--r--include/dom/core/document.h8
-rw-r--r--include/dom/core/implementation.h10
-rw-r--r--include/dom/core/impllist.h27
3 files changed, 6 insertions, 39 deletions
diff --git a/include/dom/core/document.h b/include/dom/core/document.h
index 1fe9752..ebe82b8 100644
--- a/include/dom/core/document.h
+++ b/include/dom/core/document.h
@@ -14,6 +14,7 @@
#include <stdint.h>
#include <dom/core/exceptions.h>
+#include <dom/core/implementation.h>
#include <dom/core/node.h>
struct dom_attr;
@@ -25,7 +26,6 @@ struct dom_document_fragment;
struct dom_document_type;
struct dom_element;
struct dom_entity_reference;
-struct dom_implementation;
struct dom_node;
struct dom_nodelist;
struct dom_processing_instruction;
@@ -43,7 +43,7 @@ typedef struct dom_document_vtable {
struct dom_document_type **result);
dom_exception (*dom_document_get_implementation)(
struct dom_document *doc,
- struct dom_implementation **result);
+ dom_implementation **result);
dom_exception (*dom_document_get_document_element)(
struct dom_document *doc, struct dom_element **result);
dom_exception (*dom_document_create_element)(struct dom_document *doc,
@@ -127,13 +127,13 @@ static inline dom_exception dom_document_get_doctype(struct dom_document *doc,
(dom_document *) (d), (struct dom_document_type **) (r))
static inline dom_exception dom_document_get_implementation(
- struct dom_document *doc, struct dom_implementation **result)
+ struct dom_document *doc, dom_implementation **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
dom_document_get_implementation(doc, result);
}
#define dom_document_get_implementation(d, r) dom_document_get_implementation(\
- (dom_document *) (d), (struct dom_implementation **) (r))
+ (dom_document *) (d), (dom_implementation **) (r))
static inline dom_exception dom_document_get_document_element(
struct dom_document *doc, struct dom_element **result)
diff --git a/include/dom/core/implementation.h b/include/dom/core/implementation.h
index 7865b10..6fb381c 100644
--- a/include/dom/core/implementation.h
+++ b/include/dom/core/implementation.h
@@ -18,24 +18,19 @@
struct dom_document;
struct dom_document_type;
-typedef struct dom_implementation dom_implementation;
-
-void dom_implementation_ref(struct dom_implementation *impl);
-void dom_implementation_unref(struct dom_implementation *impl);
+typedef const char *dom_implementation;
dom_exception dom_implementation_has_feature(
- struct dom_implementation *impl,
struct dom_string *feature, struct dom_string *version,
bool *result);
dom_exception dom_implementation_create_document_type(
- struct dom_implementation *impl, struct dom_string *qname,
+ struct dom_string *qname,
struct dom_string *public_id, struct dom_string *system_id,
dom_alloc alloc, void *pw,
struct dom_document_type **doctype);
dom_exception dom_implementation_create_document(
- struct dom_implementation *impl,
struct dom_string *namespace, struct dom_string *qname,
struct dom_document_type *doctype,
dom_alloc alloc, void *pw,
@@ -43,7 +38,6 @@ dom_exception dom_implementation_create_document(
struct dom_document **doc);
dom_exception dom_implementation_get_feature(
- struct dom_implementation *impl,
struct dom_string *feature, struct dom_string *version,
void **object);
diff --git a/include/dom/core/impllist.h b/include/dom/core/impllist.h
deleted file mode 100644
index 8773066..0000000
--- a/include/dom/core/impllist.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This file is part of libdom.
- * Licensed under the MIT License,
- * http://www.opensource.org/licenses/mit-license.php
- * Copyright 2007 John-Mark Bell <jmb@netsurf-browser.org>
- */
-
-#ifndef dom_core_impllist_h_
-#define dom_core_impllist_h_
-
-#include <dom/core/exceptions.h>
-
-struct dom_implementation;
-
-typedef struct dom_implementation_list dom_implementation_list;
-
-void dom_implementation_list_ref(struct dom_implementation_list *list);
-void dom_implementation_list_unref(struct dom_implementation_list *list);
-
-dom_exception dom_implementation_list_get_length(
- struct dom_implementation_list *list, unsigned long *length);
-
-dom_exception dom_implementation_list_item(
- struct dom_implementation_list *list, unsigned long index,
- struct dom_implementation **impl);
-
-#endif