summaryrefslogtreecommitdiff
path: root/include/dom/core/document.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/dom/core/document.h')
-rw-r--r--include/dom/core/document.h137
1 files changed, 68 insertions, 69 deletions
diff --git a/include/dom/core/document.h b/include/dom/core/document.h
index ebe82b8..58d4639 100644
--- a/include/dom/core/document.h
+++ b/include/dom/core/document.h
@@ -29,7 +29,6 @@ struct dom_entity_reference;
struct dom_node;
struct dom_nodelist;
struct dom_processing_instruction;
-struct dom_string;
struct dom_text;
struct lwc_string_s;
@@ -47,74 +46,74 @@ typedef struct dom_document_vtable {
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,
- struct dom_string *tag_name,
+ dom_string *tag_name,
struct dom_element **result);
dom_exception (*dom_document_create_document_fragment)(
struct dom_document *doc,
struct dom_document_fragment **result);
dom_exception (*dom_document_create_text_node)(struct dom_document *doc,
- struct dom_string *data, struct dom_text **result);
+ dom_string *data, struct dom_text **result);
dom_exception (*dom_document_create_comment)(struct dom_document *doc,
- struct dom_string *data, struct dom_comment **result);
+ dom_string *data, struct dom_comment **result);
dom_exception (*dom_document_create_cdata_section)(
- struct dom_document *doc, struct dom_string *data,
+ struct dom_document *doc, dom_string *data,
struct dom_cdata_section **result);
dom_exception (*dom_document_create_processing_instruction)(
- struct dom_document *doc, struct dom_string *target,
- struct dom_string *data,
+ struct dom_document *doc, dom_string *target,
+ dom_string *data,
struct dom_processing_instruction **result);
dom_exception (*dom_document_create_attribute)(struct dom_document *doc,
- struct dom_string *name, struct dom_attr **result);
+ dom_string *name, struct dom_attr **result);
dom_exception (*dom_document_create_entity_reference)(
- struct dom_document *doc, struct dom_string *name,
+ struct dom_document *doc, dom_string *name,
struct dom_entity_reference **result);
dom_exception (*dom_document_get_elements_by_tag_name)(
- struct dom_document *doc, struct dom_string *tagname,
+ struct dom_document *doc, dom_string *tagname,
struct dom_nodelist **result);
dom_exception (*dom_document_import_node)(struct dom_document *doc,
struct dom_node *node, bool deep,
struct dom_node **result);
dom_exception (*dom_document_create_element_ns)(
- struct dom_document *doc, struct dom_string *namespace,
- struct dom_string *qname, struct dom_element **result);
+ struct dom_document *doc, dom_string *namespace,
+ dom_string *qname, struct dom_element **result);
dom_exception (*dom_document_create_attribute_ns)(
- struct dom_document *doc, struct dom_string *namespace,
- struct dom_string *qname, struct dom_attr **result);
+ struct dom_document *doc, dom_string *namespace,
+ dom_string *qname, struct dom_attr **result);
dom_exception (*dom_document_get_elements_by_tag_name_ns)(
- struct dom_document *doc, struct dom_string *namespace,
- struct dom_string *localname,
+ struct dom_document *doc, dom_string *namespace,
+ dom_string *localname,
struct dom_nodelist **result);
dom_exception (*dom_document_get_element_by_id)(
- struct dom_document *doc, struct dom_string *id,
+ struct dom_document *doc, dom_string *id,
struct dom_element **result);
dom_exception (*dom_document_get_input_encoding)(
- struct dom_document *doc, struct dom_string **result);
+ struct dom_document *doc, dom_string **result);
dom_exception (*dom_document_get_xml_encoding)(struct dom_document *doc,
- struct dom_string **result);
+ dom_string **result);
dom_exception (*dom_document_get_xml_standalone)(
struct dom_document *doc, bool *result);
dom_exception (*dom_document_set_xml_standalone)(
struct dom_document *doc, bool standalone);
dom_exception (*dom_document_get_xml_version)(struct dom_document *doc,
- struct dom_string **result);
+ dom_string **result);
dom_exception (*dom_document_set_xml_version)(struct dom_document *doc,
- struct dom_string *version);
+ dom_string *version);
dom_exception (*dom_document_get_strict_error_checking)(
struct dom_document *doc, bool *result);
dom_exception (*dom_document_set_strict_error_checking)(
struct dom_document *doc, bool strict);
dom_exception (*dom_document_get_uri)(struct dom_document *doc,
- struct dom_string **result);
+ dom_string **result);
dom_exception (*dom_document_set_uri)(struct dom_document *doc,
- struct dom_string *uri);
+ dom_string *uri);
dom_exception (*dom_document_adopt_node)(struct dom_document *doc,
struct dom_node *node, struct dom_node **result);
dom_exception (*dom_document_get_dom_config)(struct dom_document *doc,
struct dom_configuration **result);
dom_exception (*dom_document_normalize)(struct dom_document *doc);
dom_exception (*dom_document_rename_node)(struct dom_document *doc,
- struct dom_node *node, struct dom_string *namespace,
- struct dom_string *qname, struct dom_node **result);
+ struct dom_node *node, dom_string *namespace,
+ dom_string *qname, struct dom_node **result);
} dom_document_vtable;
static inline dom_exception dom_document_get_doctype(struct dom_document *doc,
@@ -146,14 +145,14 @@ static inline dom_exception dom_document_get_document_element(
(struct dom_element **) (r))
static inline dom_exception dom_document_create_element(
- struct dom_document *doc, struct dom_string *tag_name,
+ struct dom_document *doc, dom_string *tag_name,
struct dom_element **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
dom_document_create_element(doc, tag_name, result);
}
#define dom_document_create_element(d, t, r) dom_document_create_element( \
- (dom_document *) (d), (struct dom_string *) (t), \
+ (dom_document *) (d), (dom_string *) (t), \
(struct dom_element **) (r))
static inline dom_exception dom_document_create_document_fragment(
@@ -168,7 +167,7 @@ static inline dom_exception dom_document_create_document_fragment(
(struct dom_document_fragment **) (r))
static inline dom_exception dom_document_create_text_node(
- struct dom_document *doc, struct dom_string *data,
+ struct dom_document *doc, dom_string *data,
struct dom_text **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
@@ -176,21 +175,21 @@ static inline dom_exception dom_document_create_text_node(
}
#define dom_document_create_text_node(d, data, r) \
dom_document_create_text_node((dom_document *) (d), \
- (struct dom_string *) (data), (struct dom_text **) (r))
+ (dom_string *) (data), (struct dom_text **) (r))
static inline dom_exception dom_document_create_comment(
- struct dom_document *doc, struct dom_string *data,
+ struct dom_document *doc, dom_string *data,
struct dom_comment **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
dom_document_create_comment(doc, data, result);
}
#define dom_document_create_comment(d, data, r) dom_document_create_comment( \
- (dom_document *) (d), (struct dom_string *) (data), \
+ (dom_document *) (d), (dom_string *) (data), \
(struct dom_comment **) (r))
static inline dom_exception dom_document_create_cdata_section(
- struct dom_document *doc, struct dom_string *data,
+ struct dom_document *doc, dom_string *data,
struct dom_cdata_section **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
@@ -198,12 +197,12 @@ static inline dom_exception dom_document_create_cdata_section(
}
#define dom_document_create_cdata_section(d, data, r) \
dom_document_create_cdata_section((dom_document *) (d), \
- (struct dom_string *) (data), \
+ (dom_string *) (data), \
(struct dom_cdata_section **) (r))
static inline dom_exception dom_document_create_processing_instruction(
- struct dom_document *doc, struct dom_string *target,
- struct dom_string *data,
+ struct dom_document *doc, dom_string *target,
+ dom_string *data,
struct dom_processing_instruction **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
@@ -212,23 +211,23 @@ static inline dom_exception dom_document_create_processing_instruction(
}
#define dom_document_create_processing_instruction(d, t, data, r) \
dom_document_create_processing_instruction( \
- (dom_document *) (d), (struct dom_string *) (t), \
- (struct dom_string *) (data), \
+ (dom_document *) (d), (dom_string *) (t), \
+ (dom_string *) (data), \
(struct dom_processing_instruction **) (r))
static inline dom_exception dom_document_create_attribute(
- struct dom_document *doc, struct dom_string *name,
+ struct dom_document *doc, dom_string *name,
struct dom_attr **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
dom_document_create_attribute(doc, name, result);
}
#define dom_document_create_attribute(d, n, r) dom_document_create_attribute( \
- (dom_document *) (d), (struct dom_string *) (n), \
+ (dom_document *) (d), (dom_string *) (n), \
(struct dom_attr **) (r))
static inline dom_exception dom_document_create_entity_reference(
- struct dom_document *doc, struct dom_string *name,
+ struct dom_document *doc, dom_string *name,
struct dom_entity_reference **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
@@ -237,10 +236,10 @@ static inline dom_exception dom_document_create_entity_reference(
}
#define dom_document_create_entity_reference(d, n, r) \
dom_document_create_entity_reference((dom_document *) (d), \
- (struct dom_string *) (n), (struct dom_entity_reference **) (r))
+ (dom_string *) (n), (struct dom_entity_reference **) (r))
static inline dom_exception dom_document_get_elements_by_tag_name(
- struct dom_document *doc, struct dom_string *tagname,
+ struct dom_document *doc, dom_string *tagname,
struct dom_nodelist **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
@@ -249,7 +248,7 @@ static inline dom_exception dom_document_get_elements_by_tag_name(
}
#define dom_document_get_elements_by_tag_name(d, t, r) \
dom_document_get_elements_by_tag_name((dom_document *) (d), \
- (struct dom_string *) (t), (struct dom_nodelist **) (r))
+ (dom_string *) (t), (struct dom_nodelist **) (r))
static inline dom_exception dom_document_import_node(struct dom_document *doc,
struct dom_node *node, bool deep, struct dom_node **result)
@@ -262,8 +261,8 @@ static inline dom_exception dom_document_import_node(struct dom_document *doc,
(dom_node **) (r))
static inline dom_exception dom_document_create_element_ns(
- struct dom_document *doc, struct dom_string *namespace,
- struct dom_string *qname, struct dom_element **result)
+ struct dom_document *doc, dom_string *namespace,
+ dom_string *qname, struct dom_element **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
dom_document_create_element_ns(doc, namespace,
@@ -271,12 +270,12 @@ static inline dom_exception dom_document_create_element_ns(
}
#define dom_document_create_element_ns(d, n, q, r) \
dom_document_create_element_ns((dom_document *) (d), \
- (struct dom_string *) (n), (struct dom_string *) (q), \
+ (dom_string *) (n), (dom_string *) (q), \
(struct dom_element **) (r))
static inline dom_exception dom_document_create_attribute_ns
- (struct dom_document *doc, struct dom_string *namespace,
- struct dom_string *qname, struct dom_attr **result)
+ (struct dom_document *doc, dom_string *namespace,
+ dom_string *qname, struct dom_attr **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
dom_document_create_attribute_ns(doc, namespace,
@@ -284,12 +283,12 @@ static inline dom_exception dom_document_create_attribute_ns
}
#define dom_document_create_attribute_ns(d, n, q, r) \
dom_document_create_attribute_ns((dom_document *) (d), \
- (struct dom_string *) (n), (struct dom_string *) (q), \
+ (dom_string *) (n), (dom_string *) (q), \
(struct dom_attr **) (r))
static inline dom_exception dom_document_get_elements_by_tag_name_ns(
- struct dom_document *doc, struct dom_string *namespace,
- struct dom_string *localname, struct dom_nodelist **result)
+ struct dom_document *doc, dom_string *namespace,
+ dom_string *localname, struct dom_nodelist **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
dom_document_get_elements_by_tag_name_ns(doc,
@@ -297,11 +296,11 @@ static inline dom_exception dom_document_get_elements_by_tag_name_ns(
}
#define dom_document_get_elements_by_tag_name_ns(d, n, l, r) \
dom_document_get_elements_by_tag_name_ns((dom_document *) (d),\
- (struct dom_string *) (n), (struct dom_string *) (l), \
+ (dom_string *) (n), (dom_string *) (l), \
(struct dom_nodelist **) (r))
static inline dom_exception dom_document_get_element_by_id(
- struct dom_document *doc, struct dom_string *id,
+ struct dom_document *doc, dom_string *id,
struct dom_element **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
@@ -309,25 +308,25 @@ static inline dom_exception dom_document_get_element_by_id(
}
#define dom_document_get_element_by_id(d, i, r) \
dom_document_get_element_by_id((dom_document *) (d), \
- (struct dom_string *) (i), (struct dom_element **) (r))
+ (dom_string *) (i), (struct dom_element **) (r))
static inline dom_exception dom_document_get_input_encoding(
- struct dom_document *doc, struct dom_string **result)
+ struct dom_document *doc, dom_string **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
dom_document_get_input_encoding(doc, result);
}
#define dom_document_get_input_encoding(d, r) dom_document_get_input_encoding(\
- (dom_document *) (d), (struct dom_string **) (r))
+ (dom_document *) (d), (dom_string **) (r))
static inline dom_exception dom_document_get_xml_encoding(
- struct dom_document *doc, struct dom_string **result)
+ struct dom_document *doc, dom_string **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
dom_document_get_xml_encoding(doc, result);
}
#define dom_document_get_xml_encoding(d, r) dom_document_get_xml_encoding( \
- (dom_document *) (d), (struct dom_string **) (r))
+ (dom_document *) (d), (dom_string **) (r))
static inline dom_exception dom_document_get_xml_standalone(
struct dom_document *doc, bool *result)
@@ -348,22 +347,22 @@ static inline dom_exception dom_document_set_xml_standalone(
(dom_document *) (d), (bool) (s))
static inline dom_exception dom_document_get_xml_version(
- struct dom_document *doc, struct dom_string **result)
+ struct dom_document *doc, dom_string **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
dom_document_get_xml_version(doc, result);
}
#define dom_document_get_xml_version(d, r) dom_document_get_xml_version( \
- (dom_document *) (d), (struct dom_string **) (r))
+ (dom_document *) (d), (dom_string **) (r))
static inline dom_exception dom_document_set_xml_version(
- struct dom_document *doc, struct dom_string *version)
+ struct dom_document *doc, dom_string *version)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
dom_document_set_xml_version(doc, version);
}
#define dom_document_set_xml_version(d, v) dom_document_set_xml_version( \
- (dom_document *) (d), (struct dom_string *) (v))
+ (dom_document *) (d), (dom_string *) (v))
static inline dom_exception dom_document_get_strict_error_checking(
struct dom_document *doc, bool *result)
@@ -386,22 +385,22 @@ static inline dom_exception dom_document_set_strict_error_checking(
(bool) (s))
static inline dom_exception dom_document_get_uri(struct dom_document *doc,
- struct dom_string **result)
+ dom_string **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
dom_document_get_uri(doc, result);
}
#define dom_document_get_uri(d, r) dom_document_get_uri((dom_document *) (d), \
- (struct dom_string **) (r))
+ (dom_string **) (r))
static inline dom_exception dom_document_set_uri(struct dom_document *doc,
- struct dom_string *uri)
+ dom_string *uri)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
dom_document_set_uri(doc, uri);
}
#define dom_document_set_uri(d, u) dom_document_set_uri((dom_document *) (d), \
- (struct dom_string *) (u))
+ (dom_string *) (u))
static inline dom_exception dom_document_adopt_node(struct dom_document *doc,
struct dom_node *node, struct dom_node **result)
@@ -430,7 +429,7 @@ static inline dom_exception dom_document_normalize(struct dom_document *doc)
static inline dom_exception dom_document_rename_node(struct dom_document *doc,
struct dom_node *node,
- struct dom_string *namespace, struct dom_string *qname,
+ dom_string *namespace, dom_string *qname,
struct dom_node **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
@@ -438,7 +437,7 @@ static inline dom_exception dom_document_rename_node(struct dom_document *doc,
result);
}
#define dom_document_rename_node(d, n, ns, q, r) dom_document_rename_node( \
- (dom_document *) (d), (struct dom_string *) (ns), \
- (struct dom_string *) (q), (dom_node **) (r))
+ (dom_document *) (d), (dom_string *) (ns), \
+ (dom_string *) (q), (dom_node **) (r))
#endif