[aravis/dom: 2/5] dom: grand rename (Lsm -> Arv).
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aravis/dom: 2/5] dom: grand rename (Lsm -> Arv).
- Date: Sun, 26 Feb 2012 13:45:59 +0000 (UTC)
commit 01a3af8f50a3ac77fc09909c7ed11506ceea4034
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Sun Feb 19 17:58:51 2012 +0100
dom: grand rename (Lsm -> Arv).
src/lsmdom.h | 6 +-
src/lsmdomcharacterdata.c | 48 ++++----
src/lsmdomcharacterdata.h | 30 ++--
src/lsmdomdocument.c | 88 ++++++------
src/lsmdomdocument.h | 54 ++++----
src/lsmdomdocumentfragment.c | 36 +++---
src/lsmdomdocumentfragment.h | 28 ++--
src/lsmdomelement.c | 60 +++++-----
src/lsmdomelement.h | 38 +++---
src/lsmdomenumtypes.c | 52 ++++----
src/lsmdomenumtypes.h | 10 +-
src/lsmdomimplementation.c | 20 ++--
src/lsmdomimplementation.h | 16 +-
src/lsmdomnamednodemap.c | 40 +++---
src/lsmdomnamednodemap.h | 42 +++---
src/lsmdomnode.c | 298 +++++++++++++++++++++---------------------
src/lsmdomnode.h | 120 +++++++++---------
src/lsmdomnodelist.c | 22 ++--
src/lsmdomnodelist.h | 30 ++--
src/lsmdomparser.c | 150 +++++++++++-----------
src/lsmdomparser.h | 20 ++--
src/lsmdomtext.c | 42 +++---
src/lsmdomtext.h | 28 ++--
src/lsmdomtypes.h | 24 ++--
24 files changed, 651 insertions(+), 651 deletions(-)
---
diff --git a/src/lsmdom.h b/src/lsmdom.h
index 71c7515..38195aa 100644
--- a/src/lsmdom.h
+++ b/src/lsmdom.h
@@ -1,4 +1,4 @@
-/* Lasem
+/* Aravis
*
* Copyright  2007-2008 Emmanuel Pacaud
*
@@ -21,8 +21,8 @@
* Emmanuel Pacaud <emmanuel gnome org>
*/
-#ifndef LSM_DOM_H
-#define LSM_DOM_H
+#ifndef ARV_DOM_H
+#define ARV_DOM_H
#include <lsm.h>
diff --git a/src/lsmdomcharacterdata.c b/src/lsmdomcharacterdata.c
index 69c1876..3fc5f5d 100644
--- a/src/lsmdomcharacterdata.c
+++ b/src/lsmdomcharacterdata.c
@@ -1,4 +1,4 @@
-/* Lasem
+/* Aravis
*
* Copyright  2007-2010 Emmanuel Pacaud
*
@@ -32,33 +32,33 @@
static GObjectClass *parent_class = NULL;
-/* LsmDomNode implementation */
+/* ArvDomNode implementation */
static void
-lsm_dom_character_data_write_to_stream (LsmDomNode *self, GOutputStream *stream, GError **error)
+arv_dom_character_data_write_to_stream (ArvDomNode *self, GOutputStream *stream, GError **error)
{
- LsmDomCharacterData *character_data = LSM_DOM_CHARACTER_DATA (self);
+ ArvDomCharacterData *character_data = ARV_DOM_CHARACTER_DATA (self);
if (character_data->data != NULL)
g_output_stream_write (stream, character_data->data, strlen (character_data->data), NULL, error);
}
static const char *
-lsm_dom_character_data_get_node_value (LsmDomNode* self)
+arv_dom_character_data_get_node_value (ArvDomNode* self)
{
- return lsm_dom_character_data_get_data (LSM_DOM_CHARACTER_DATA (self));
+ return arv_dom_character_data_get_data (ARV_DOM_CHARACTER_DATA (self));
}
static void
-lsm_dom_character_data_set_node_value (LsmDomNode* self, const char *value)
+arv_dom_character_data_set_node_value (ArvDomNode* self, const char *value)
{
- lsm_dom_character_data_set_data (LSM_DOM_CHARACTER_DATA (self), value);
+ arv_dom_character_data_set_data (ARV_DOM_CHARACTER_DATA (self), value);
}
-/* LsmDomCharacterData implementation */
+/* ArvDomCharacterData implementation */
const char *
-lsm_dom_character_data_get_data (LsmDomCharacterData* self)
+arv_dom_character_data_get_data (ArvDomCharacterData* self)
{
g_return_val_if_fail (LSM_IS_DOM_CHARACTER_DATA (self), NULL);
@@ -66,7 +66,7 @@ lsm_dom_character_data_get_data (LsmDomCharacterData* self)
}
void
-lsm_dom_character_data_set_data (LsmDomCharacterData* self, const char * value)
+arv_dom_character_data_set_data (ArvDomCharacterData* self, const char * value)
{
g_return_if_fail (LSM_IS_DOM_CHARACTER_DATA (self));
g_return_if_fail (value != NULL);
@@ -74,41 +74,41 @@ lsm_dom_character_data_set_data (LsmDomCharacterData* self, const char * value)
g_free (self->data);
self->data = g_strdup (value);
- lsm_debug_dom ("[LsmDomCharacterData::set_data] Value = '%s'", value);
+ lsm_debug_dom ("[ArvDomCharacterData::set_data] Value = '%s'", value);
- lsm_dom_node_changed (LSM_DOM_NODE (self));
+ arv_dom_node_changed (ARV_DOM_NODE (self));
}
static void
-lsm_dom_character_data_init (LsmDomCharacterData *character_data)
+arv_dom_character_data_init (ArvDomCharacterData *character_data)
{
}
static void
-lsm_dom_character_data_finalize (GObject *object)
+arv_dom_character_data_finalize (GObject *object)
{
- LsmDomCharacterData *self = LSM_DOM_CHARACTER_DATA (object);
+ ArvDomCharacterData *self = ARV_DOM_CHARACTER_DATA (object);
g_free (self->data);
parent_class->finalize (object);
}
-/* LsmDomCharacterData class */
+/* ArvDomCharacterData class */
static void
-lsm_dom_character_data_class_init (LsmDomCharacterDataClass *character_data_class)
+arv_dom_character_data_class_init (ArvDomCharacterDataClass *character_data_class)
{
GObjectClass *object_class = G_OBJECT_CLASS (character_data_class);
- LsmDomNodeClass *node_class = LSM_DOM_NODE_CLASS (character_data_class);
+ ArvDomNodeClass *node_class = ARV_DOM_NODE_CLASS (character_data_class);
parent_class = g_type_class_peek_parent (character_data_class);
- object_class->finalize = lsm_dom_character_data_finalize;
+ object_class->finalize = arv_dom_character_data_finalize;
- node_class->write_to_stream = lsm_dom_character_data_write_to_stream;
- node_class->set_node_value = lsm_dom_character_data_set_node_value;
- node_class->get_node_value = lsm_dom_character_data_get_node_value;
+ node_class->write_to_stream = arv_dom_character_data_write_to_stream;
+ node_class->set_node_value = arv_dom_character_data_set_node_value;
+ node_class->get_node_value = arv_dom_character_data_get_node_value;
}
-G_DEFINE_ABSTRACT_TYPE (LsmDomCharacterData, lsm_dom_character_data, LSM_TYPE_DOM_NODE)
+G_DEFINE_ABSTRACT_TYPE (ArvDomCharacterData, arv_dom_character_data, LSM_TYPE_DOM_NODE)
diff --git a/src/lsmdomcharacterdata.h b/src/lsmdomcharacterdata.h
index 2abedb1..db0d5d6 100644
--- a/src/lsmdomcharacterdata.h
+++ b/src/lsmdomcharacterdata.h
@@ -1,4 +1,4 @@
-/* Lasem
+/* Aravis
*
* Copyright  2007-2010 Emmanuel Pacaud
*
@@ -21,37 +21,37 @@
* Emmanuel Pacaud <emmanuel gnome org>
*/
-#ifndef LSM_DOM_CHARACTER_DATA_H
-#define LSM_DOM_CHARACTER_DATA_H
+#ifndef ARV_DOM_CHARACTER_DATA_H
+#define ARV_DOM_CHARACTER_DATA_H
#include <lsmdomnode.h>
G_BEGIN_DECLS
-#define LSM_TYPE_DOM_CHARACTER_DATA (lsm_dom_character_data_get_type ())
-#define LSM_DOM_CHARACTER_DATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LSM_TYPE_DOM_CHARACTER_DATA, LsmDomCharacterData))
-#define LSM_DOM_CHARACTER_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LSM_TYPE_DOM_CHARACTER_DATA, LsmDomNodeClass))
+#define LSM_TYPE_DOM_CHARACTER_DATA (arv_dom_character_data_get_type ())
+#define ARV_DOM_CHARACTER_DATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LSM_TYPE_DOM_CHARACTER_DATA, ArvDomCharacterData))
+#define ARV_DOM_CHARACTER_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LSM_TYPE_DOM_CHARACTER_DATA, ArvDomNodeClass))
#define LSM_IS_DOM_CHARACTER_DATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LSM_TYPE_DOM_CHARACTER_DATA))
#define LSM_IS_DOM_CHARACTER_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LSM_TYPE_DOM_CHARACTER_DATA))
-#define LSM_DOM_CHARACTER_DATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), LSM_TYPE_DOM_CHARACTER_DATA, LsmDomCharacterDataClass))
+#define ARV_DOM_CHARACTER_DATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), LSM_TYPE_DOM_CHARACTER_DATA, ArvDomCharacterDataClass))
-typedef struct _LsmDomCharacterDataClass LsmDomCharacterDataClass;
+typedef struct _ArvDomCharacterDataClass ArvDomCharacterDataClass;
-struct _LsmDomCharacterData
+struct _ArvDomCharacterData
{
- LsmDomNode node;
+ ArvDomNode node;
char *data;
};
-struct _LsmDomCharacterDataClass {
- LsmDomNodeClass parent_class;
+struct _ArvDomCharacterDataClass {
+ ArvDomNodeClass parent_class;
};
-GType lsm_dom_character_data_get_type (void);
+GType arv_dom_character_data_get_type (void);
-const char * lsm_dom_character_data_get_data (LsmDomCharacterData* self);
-void lsm_dom_character_data_set_data (LsmDomCharacterData* self, const char* value);
+const char * arv_dom_character_data_get_data (ArvDomCharacterData* self);
+void arv_dom_character_data_set_data (ArvDomCharacterData* self, const char* value);
G_END_DECLS
diff --git a/src/lsmdomdocument.c b/src/lsmdomdocument.c
index e340e3d..b5d081d 100644
--- a/src/lsmdomdocument.c
+++ b/src/lsmdomdocument.c
@@ -1,4 +1,4 @@
-/* Lasem
+/* Aravis
*
* Copyright  2007-2010 Emmanuel Pacaud
*
@@ -36,79 +36,79 @@
static GObjectClass *parent_class;
-/* LsmDomNode implementation */
+/* ArvDomNode implementation */
static const char *
-lsm_dom_document_get_node_name (LsmDomNode *node)
+arv_dom_document_get_node_name (ArvDomNode *node)
{
return "#document";
}
-static LsmDomNodeType
-lsm_dom_document_get_node_type (LsmDomNode *node)
+static ArvDomNodeType
+arv_dom_document_get_node_type (ArvDomNode *node)
{
- return LSM_DOM_NODE_TYPE_DOCUMENT_NODE;
+ return ARV_DOM_NODE_TYPE_DOCUMENT_NODE;
}
-/* LsmDomDocument implementation */
+/* ArvDomDocument implementation */
-LsmDomElement *
-lsm_dom_document_get_document_element (LsmDomDocument *self)
+ArvDomElement *
+arv_dom_document_get_document_element (ArvDomDocument *self)
{
g_return_val_if_fail (LSM_IS_DOM_DOCUMENT (self), NULL);
- return LSM_DOM_ELEMENT (lsm_dom_node_get_first_child (LSM_DOM_NODE (self)));
+ return ARV_DOM_ELEMENT (arv_dom_node_get_first_child (ARV_DOM_NODE (self)));
}
-LsmDomElement *
-lsm_dom_document_create_element (LsmDomDocument *document, const char *tag_name)
+ArvDomElement *
+arv_dom_document_create_element (ArvDomDocument *document, const char *tag_name)
{
- LsmDomDocumentClass *document_class;
+ ArvDomDocumentClass *document_class;
g_return_val_if_fail (LSM_IS_DOM_DOCUMENT (document), NULL);
- document_class = LSM_DOM_DOCUMENT_GET_CLASS (document);
+ document_class = ARV_DOM_DOCUMENT_GET_CLASS (document);
if (document_class->create_element != NULL)
return document_class->create_element (document, tag_name);
return NULL;
}
-LsmDomText *
-lsm_dom_document_create_text_node_base (LsmDomDocument *document, const char *data)
+ArvDomText *
+arv_dom_document_create_text_node_base (ArvDomDocument *document, const char *data)
{
- return LSM_DOM_TEXT (lsm_dom_text_new (data));
+ return ARV_DOM_TEXT (arv_dom_text_new (data));
}
-LsmDomText *
-lsm_dom_document_create_text_node (LsmDomDocument *document, const char *data)
+ArvDomText *
+arv_dom_document_create_text_node (ArvDomDocument *document, const char *data)
{
g_return_val_if_fail (LSM_IS_DOM_DOCUMENT (document), NULL);
- return LSM_DOM_DOCUMENT_GET_CLASS (document)->create_text_node (document, data);
+ return ARV_DOM_DOCUMENT_GET_CLASS (document)->create_text_node (document, data);
}
-LsmDomView *
-lsm_dom_document_create_view (LsmDomDocument *self)
+ArvDomView *
+arv_dom_document_create_view (ArvDomDocument *self)
{
g_return_val_if_fail (LSM_IS_DOM_DOCUMENT (self), NULL);
- return LSM_DOM_DOCUMENT_GET_CLASS (self)->create_view (self);
+ return ARV_DOM_DOCUMENT_GET_CLASS (self)->create_view (self);
}
-LsmDomElement *
-lsm_dom_document_get_element_by_id (LsmDomDocument *self, const char *id)
+ArvDomElement *
+arv_dom_document_get_element_by_id (ArvDomDocument *self, const char *id)
{
g_return_val_if_fail (LSM_IS_DOM_DOCUMENT (self), NULL);
g_return_val_if_fail (id != NULL, NULL);
- lsm_debug_dom ("[LsmDomDocument::get_element_by_id] Lookup '%s'", id);
+ lsm_debug_dom ("[ArvDomDocument::get_element_by_id] Lookup '%s'", id);
return g_hash_table_lookup (self->ids, id);
}
void
-lsm_dom_document_register_element (LsmDomDocument *self, LsmDomElement *element, const char *id)
+arv_dom_document_register_element (ArvDomDocument *self, ArvDomElement *element, const char *id)
{
char *old_id;
@@ -116,7 +116,7 @@ lsm_dom_document_register_element (LsmDomDocument *self, LsmDomElement *element,
old_id = g_hash_table_lookup (self->elements, element);
if (old_id != NULL) {
- lsm_debug_dom ("[LsmDomDocument::register_element] Unregister '%s'", old_id);
+ lsm_debug_dom ("[ArvDomDocument::register_element] Unregister '%s'", old_id);
g_hash_table_remove (self->elements, element);
g_hash_table_remove (self->ids, old_id);
@@ -125,7 +125,7 @@ lsm_dom_document_register_element (LsmDomDocument *self, LsmDomElement *element,
if (id != NULL) {
char *new_id = g_strdup (id);
- lsm_debug_dom ("[LsmDomDocument::register_element] Register '%s'", id);
+ lsm_debug_dom ("[ArvDomDocument::register_element] Register '%s'", id);
g_hash_table_replace (self->ids, new_id, element);
g_hash_table_replace (self->elements, element, new_id);
@@ -133,7 +133,7 @@ lsm_dom_document_register_element (LsmDomDocument *self, LsmDomElement *element,
}
const char *
-lsm_dom_document_get_url (LsmDomDocument *self)
+arv_dom_document_get_url (ArvDomDocument *self)
{
g_return_val_if_fail (LSM_IS_DOM_DOCUMENT (self), NULL);
@@ -141,7 +141,7 @@ lsm_dom_document_get_url (LsmDomDocument *self)
}
void
-lsm_dom_document_set_path (LsmDomDocument *self, const char *path)
+arv_dom_document_set_path (ArvDomDocument *self, const char *path)
{
g_return_if_fail (LSM_IS_DOM_DOCUMENT (self));
@@ -156,7 +156,7 @@ lsm_dom_document_set_path (LsmDomDocument *self, const char *path)
}
void
-lsm_dom_document_set_url (LsmDomDocument *self, const char *url)
+arv_dom_document_set_url (ArvDomDocument *self, const char *url)
{
g_return_if_fail (LSM_IS_DOM_DOCUMENT (self));
g_return_if_fail (url == NULL || lsm_str_is_uri (url));
@@ -166,7 +166,7 @@ lsm_dom_document_set_url (LsmDomDocument *self, const char *url)
}
void *
-lsm_dom_document_get_href_data (LsmDomDocument *self, const char *href, gsize *size)
+arv_dom_document_get_href_data (ArvDomDocument *self, const char *href, gsize *size)
{
GFile *file;
char *data = NULL;
@@ -203,16 +203,16 @@ lsm_dom_document_get_href_data (LsmDomDocument *self, const char *href, gsize *s
}
static void
-lsm_dom_document_init (LsmDomDocument *document)
+arv_dom_document_init (ArvDomDocument *document)
{
document->ids = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
document->elements = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, NULL);
}
static void
-lsm_dom_document_finalize (GObject *object)
+arv_dom_document_finalize (GObject *object)
{
- LsmDomDocument *document = LSM_DOM_DOCUMENT (object);
+ ArvDomDocument *document = ARV_DOM_DOCUMENT (object);
g_hash_table_unref (document->elements);
g_hash_table_unref (document->ids);
@@ -222,23 +222,23 @@ lsm_dom_document_finalize (GObject *object)
parent_class->finalize (object);
}
-/* LsmDomDocument class */
+/* ArvDomDocument class */
static void
-lsm_dom_document_class_init (LsmDomDocumentClass *klass)
+arv_dom_document_class_init (ArvDomDocumentClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- LsmDomNodeClass *node_class = LSM_DOM_NODE_CLASS (klass);
+ ArvDomNodeClass *node_class = ARV_DOM_NODE_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
- object_class->finalize = lsm_dom_document_finalize;
+ object_class->finalize = arv_dom_document_finalize;
- node_class->get_node_name = lsm_dom_document_get_node_name;
- node_class->get_node_type = lsm_dom_document_get_node_type;
+ node_class->get_node_name = arv_dom_document_get_node_name;
+ node_class->get_node_type = arv_dom_document_get_node_type;
- klass->create_text_node = lsm_dom_document_create_text_node_base;
+ klass->create_text_node = arv_dom_document_create_text_node_base;
}
-G_DEFINE_ABSTRACT_TYPE (LsmDomDocument, lsm_dom_document, LSM_TYPE_DOM_NODE)
+G_DEFINE_ABSTRACT_TYPE (ArvDomDocument, arv_dom_document, LSM_TYPE_DOM_NODE)
diff --git a/src/lsmdomdocument.h b/src/lsmdomdocument.h
index 597631a..aebf796 100644
--- a/src/lsmdomdocument.h
+++ b/src/lsmdomdocument.h
@@ -1,4 +1,4 @@
-/* Lasem
+/* Aravis
*
* Copyright  2007-2008 Emmanuel Pacaud
*
@@ -21,8 +21,8 @@
* Emmanuel Pacaud <emmanuel gnome org>
*/
-#ifndef LSM_DOM_DOCUMENT_H
-#define LSM_DOM_DOCUMENT_H
+#ifndef ARV_DOM_DOCUMENT_H
+#define ARV_DOM_DOCUMENT_H
#include <lsmtypes.h>
#include <lsmdomtypes.h>
@@ -31,17 +31,17 @@
G_BEGIN_DECLS
-#define LSM_TYPE_DOM_DOCUMENT (lsm_dom_document_get_type ())
-#define LSM_DOM_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LSM_TYPE_DOM_DOCUMENT, LsmDomDocument))
-#define LSM_DOM_DOCUMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LSM_TYPE_DOM_DOCUMENT, LsmDomDocumentClass))
+#define LSM_TYPE_DOM_DOCUMENT (arv_dom_document_get_type ())
+#define ARV_DOM_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LSM_TYPE_DOM_DOCUMENT, ArvDomDocument))
+#define ARV_DOM_DOCUMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LSM_TYPE_DOM_DOCUMENT, ArvDomDocumentClass))
#define LSM_IS_DOM_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LSM_TYPE_DOM_DOCUMENT))
#define LSM_IS_DOM_DOCUMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LSM_TYPE_DOM_DOCUMENT))
-#define LSM_DOM_DOCUMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), LSM_TYPE_DOM_DOCUMENT, LsmDomDocumentClass))
+#define ARV_DOM_DOCUMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), LSM_TYPE_DOM_DOCUMENT, ArvDomDocumentClass))
-typedef struct _LsmDomDocumentClass LsmDomDocumentClass;
+typedef struct _ArvDomDocumentClass ArvDomDocumentClass;
-struct _LsmDomDocument {
- LsmDomNode node;
+struct _ArvDomDocument {
+ ArvDomNode node;
GHashTable * ids;
GHashTable * elements;
@@ -50,32 +50,32 @@ struct _LsmDomDocument {
};
-struct _LsmDomDocumentClass {
- LsmDomNodeClass parent_class;
+struct _ArvDomDocumentClass {
+ ArvDomNodeClass parent_class;
- LsmDomElement * (*get_document_element) (LsmDomDocument* self);
- LsmDomElement * (*create_element) (LsmDomDocument* self, const char *tag_name);
- LsmDomText * (*create_text_node) (LsmDomDocument* self, const char *data);
+ ArvDomElement * (*get_document_element) (ArvDomDocument* self);
+ ArvDomElement * (*create_element) (ArvDomDocument* self, const char *tag_name);
+ ArvDomText * (*create_text_node) (ArvDomDocument* self, const char *data);
- LsmDomView* (*create_view) (LsmDomDocument *self);
+ ArvDomView* (*create_view) (ArvDomDocument *self);
};
-GType lsm_dom_document_get_type (void);
+GType arv_dom_document_get_type (void);
-LsmDomElement* lsm_dom_document_get_document_element (LsmDomDocument* self);
-LsmDomElement* lsm_dom_document_create_element (LsmDomDocument* self, const char *tag_name);
-LsmDomText* lsm_dom_document_create_text_node (LsmDomDocument* self, const char *data);
-LsmDomElement * lsm_dom_document_get_element_by_id (LsmDomDocument *self, const char *id);
+ArvDomElement* arv_dom_document_get_document_element (ArvDomDocument* self);
+ArvDomElement* arv_dom_document_create_element (ArvDomDocument* self, const char *tag_name);
+ArvDomText* arv_dom_document_create_text_node (ArvDomDocument* self, const char *data);
+ArvDomElement * arv_dom_document_get_element_by_id (ArvDomDocument *self, const char *id);
-void lsm_dom_document_register_element (LsmDomDocument *self, LsmDomElement *element, const char *id);
+void arv_dom_document_register_element (ArvDomDocument *self, ArvDomElement *element, const char *id);
-LsmDomView* lsm_dom_document_create_view (LsmDomDocument *self);
+ArvDomView* arv_dom_document_create_view (ArvDomDocument *self);
-const char * lsm_dom_document_get_url (LsmDomDocument *self);
-void lsm_dom_document_set_url (LsmDomDocument *self, const char *url);
-void lsm_dom_document_set_path (LsmDomDocument *self, const char *path);
+const char * arv_dom_document_get_url (ArvDomDocument *self);
+void arv_dom_document_set_url (ArvDomDocument *self, const char *url);
+void arv_dom_document_set_path (ArvDomDocument *self, const char *path);
-void * lsm_dom_document_get_href_data (LsmDomDocument *self, const char *href, gsize *size);
+void * arv_dom_document_get_href_data (ArvDomDocument *self, const char *href, gsize *size);
G_END_DECLS
diff --git a/src/lsmdomdocumentfragment.c b/src/lsmdomdocumentfragment.c
index 297db5b..f37ce54 100644
--- a/src/lsmdomdocumentfragment.c
+++ b/src/lsmdomdocumentfragment.c
@@ -1,4 +1,4 @@
-/* Lasem
+/* Aravis
*
* Copyright  2010 Emmanuel Pacaud
*
@@ -31,51 +31,51 @@
static GObjectClass *parent_class = NULL;
-/* LsmDomNode implementation */
+/* ArvDomNode implementation */
static const char *
-lsm_dom_document_fragment_get_node_name (LsmDomNode *node)
+arv_dom_document_fragment_get_node_name (ArvDomNode *node)
{
return "#document-fragment";
}
static const char *
-lsm_dom_document_fragment_get_node_value (LsmDomNode *node)
+arv_dom_document_fragment_get_node_value (ArvDomNode *node)
{
return NULL;
}
-static LsmDomNodeType
-lsm_dom_document_fragment_get_node_type (LsmDomNode *node)
+static ArvDomNodeType
+arv_dom_document_fragment_get_node_type (ArvDomNode *node)
{
- return LSM_DOM_NODE_TYPE_DOCUMENT_FRAGMENT_NODE;
+ return ARV_DOM_NODE_TYPE_DOCUMENT_FRAGMENT_NODE;
}
-/* LsmDomDocumentFragment implementation */
+/* ArvDomDocumentFragment implementation */
-LsmDomDocumentFragment *
-lsm_dom_document_fragment_new (void)
+ArvDomDocumentFragment *
+arv_dom_document_fragment_new (void)
{
return g_object_new (LSM_TYPE_DOM_DOCUMENT_FRAGMENT, NULL);
}
static void
-lsm_dom_document_fragment_init (LsmDomDocumentFragment *document_fragment)
+arv_dom_document_fragment_init (ArvDomDocumentFragment *document_fragment)
{
}
-/* LsmDomDocumentFragment class */
+/* ArvDomDocumentFragment class */
static void
-lsm_dom_document_fragment_class_init (LsmDomDocumentFragmentClass *klass)
+arv_dom_document_fragment_class_init (ArvDomDocumentFragmentClass *klass)
{
- LsmDomNodeClass *node_class = LSM_DOM_NODE_CLASS (klass);
+ ArvDomNodeClass *node_class = ARV_DOM_NODE_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
- node_class->get_node_name = lsm_dom_document_fragment_get_node_name;
- node_class->get_node_value = lsm_dom_document_fragment_get_node_value;
- node_class->get_node_type = lsm_dom_document_fragment_get_node_type;
+ node_class->get_node_name = arv_dom_document_fragment_get_node_name;
+ node_class->get_node_value = arv_dom_document_fragment_get_node_value;
+ node_class->get_node_type = arv_dom_document_fragment_get_node_type;
}
-G_DEFINE_ABSTRACT_TYPE (LsmDomDocumentFragment, lsm_dom_document_fragment, LSM_TYPE_DOM_NODE)
+G_DEFINE_ABSTRACT_TYPE (ArvDomDocumentFragment, arv_dom_document_fragment, LSM_TYPE_DOM_NODE)
diff --git a/src/lsmdomdocumentfragment.h b/src/lsmdomdocumentfragment.h
index 4a7d4c6..261dd8f 100644
--- a/src/lsmdomdocumentfragment.h
+++ b/src/lsmdomdocumentfragment.h
@@ -1,4 +1,4 @@
-/* Lasem
+/* Aravis
*
* Copyright  2010 Emmanuel Pacaud
*
@@ -21,34 +21,34 @@
* Emmanuel Pacaud <emmanuel gnome org>
*/
-#ifndef LSM_DOM_DOCUMENT_FRAGMENT_H
-#define LSM_DOM_DOCUMENT_FRAGMENT_H
+#ifndef ARV_DOM_DOCUMENT_FRAGMENT_H
+#define ARV_DOM_DOCUMENT_FRAGMENT_H
#include <lsmdom.h>
#include <lsmdomnode.h>
G_BEGIN_DECLS
-#define LSM_TYPE_DOM_DOCUMENT_FRAGMENT (lsm_dom_document_fragment_get_type ())
-#define LSM_DOM_DOCUMENT_FRAGMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LSM_TYPE_DOM_DOCUMENT_FRAGMENT, LsmDomDocumentFragment))
-#define LSM_DOM_DOCUMENT_FRAGMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LSM_TYPE_DOM_DOCUMENT_FRAGMENT, LsmDomDocumentFragmentClass))
+#define LSM_TYPE_DOM_DOCUMENT_FRAGMENT (arv_dom_document_fragment_get_type ())
+#define ARV_DOM_DOCUMENT_FRAGMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LSM_TYPE_DOM_DOCUMENT_FRAGMENT, ArvDomDocumentFragment))
+#define ARV_DOM_DOCUMENT_FRAGMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LSM_TYPE_DOM_DOCUMENT_FRAGMENT, ArvDomDocumentFragmentClass))
#define LSM_IS_DOM_DOCUMENT_FRAGMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LSM_TYPE_DOM_DOCUMENT_FRAGMENT))
#define LSM_IS_DOM_DOCUMENT_FRAGMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LSM_TYPE_DOM_DOCUMENT_FRAGMENT))
-#define LSM_DOM_DOCUMENT_FRAGMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), LSM_TYPE_DOM_DOCUMENT_FRAGMENT, LsmDomDocumentFragmentClass))
+#define ARV_DOM_DOCUMENT_FRAGMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), LSM_TYPE_DOM_DOCUMENT_FRAGMENT, ArvDomDocumentFragmentClass))
-typedef struct _LsmDomDocumentFragmentClass LsmDomDocumentFragmentClass;
+typedef struct _ArvDomDocumentFragmentClass ArvDomDocumentFragmentClass;
-struct _LsmDomDocumentFragment {
- LsmDomNode node;
+struct _ArvDomDocumentFragment {
+ ArvDomNode node;
};
-struct _LsmDomDocumentFragmentClass {
- LsmDomNodeClass parent_class;
+struct _ArvDomDocumentFragmentClass {
+ ArvDomNodeClass parent_class;
};
-GType lsm_dom_document_fragment_get_type (void);
+GType arv_dom_document_fragment_get_type (void);
-LsmDomDocumentFragment * lsm_dom_document_fragment_new (void);
+ArvDomDocumentFragment * arv_dom_document_fragment_new (void);
G_END_DECLS
diff --git a/src/lsmdomelement.c b/src/lsmdomelement.c
index bc3be95..8efa986 100644
--- a/src/lsmdomelement.c
+++ b/src/lsmdomelement.c
@@ -1,4 +1,4 @@
-/* Lasem
+/* Aravis
*
* Copyright  2007-2008 Emmanuel Pacaud
*
@@ -31,94 +31,94 @@
static GObjectClass *parent_class = NULL;
-/* LsmDomNode implementation */
+/* ArvDomNode implementation */
static const char *
-lsm_dom_element_get_node_value (LsmDomNode *node)
+arv_dom_element_get_node_value (ArvDomNode *node)
{
return NULL;
}
-static LsmDomNodeType
-lsm_dom_element_get_node_type (LsmDomNode *node)
+static ArvDomNodeType
+arv_dom_element_get_node_type (ArvDomNode *node)
{
- return LSM_DOM_NODE_TYPE_ELEMENT_NODE;
+ return ARV_DOM_NODE_TYPE_ELEMENT_NODE;
}
static void
-lsm_dom_element_write_to_stream (LsmDomNode *self, GOutputStream *stream, GError **error)
+arv_dom_element_write_to_stream (ArvDomNode *self, GOutputStream *stream, GError **error)
{
- LsmDomElementClass *element_class;
+ ArvDomElementClass *element_class;
char *string;
char *attributes = NULL;
- element_class = LSM_DOM_ELEMENT_GET_CLASS (self);
+ element_class = ARV_DOM_ELEMENT_GET_CLASS (self);
if (element_class->get_serialized_attributes != NULL)
- attributes = element_class->get_serialized_attributes (LSM_DOM_ELEMENT (self));
+ attributes = element_class->get_serialized_attributes (ARV_DOM_ELEMENT (self));
if (attributes != NULL)
- string = g_strdup_printf ("<%s %s>", lsm_dom_node_get_node_name (self), attributes);
+ string = g_strdup_printf ("<%s %s>", arv_dom_node_get_node_name (self), attributes);
else
- string = g_strdup_printf ("<%s>", lsm_dom_node_get_node_name (self));
+ string = g_strdup_printf ("<%s>", arv_dom_node_get_node_name (self));
g_output_stream_write (stream, string, strlen (string), NULL, error);
g_free (string);
g_free (attributes);
- LSM_DOM_NODE_CLASS (parent_class)->write_to_stream (self, stream, error);
+ ARV_DOM_NODE_CLASS (parent_class)->write_to_stream (self, stream, error);
- string = g_strdup_printf ("</\%s>\n", lsm_dom_node_get_node_name (self));
+ string = g_strdup_printf ("</\%s>\n", arv_dom_node_get_node_name (self));
g_output_stream_write (stream, string, strlen (string), NULL, error);
g_free (string);
}
-/* LsmDomElement implementation */
+/* ArvDomElement implementation */
const char *
-lsm_dom_element_get_attribute (LsmDomElement* self, const char* name)
+arv_dom_element_get_attribute (ArvDomElement* self, const char* name)
{
g_return_val_if_fail (LSM_IS_DOM_ELEMENT (self), NULL);
g_return_val_if_fail (name != NULL, NULL);
- return LSM_DOM_ELEMENT_GET_CLASS (self)->get_attribute (self, name);
+ return ARV_DOM_ELEMENT_GET_CLASS (self)->get_attribute (self, name);
}
void
-lsm_dom_element_set_attribute (LsmDomElement* self, const char* name, const char* attribute_value)
+arv_dom_element_set_attribute (ArvDomElement* self, const char* name, const char* attribute_value)
{
g_return_if_fail (LSM_IS_DOM_ELEMENT (self));
g_return_if_fail (name != NULL);
- LSM_DOM_ELEMENT_GET_CLASS (self)->set_attribute (self, name, attribute_value);
+ ARV_DOM_ELEMENT_GET_CLASS (self)->set_attribute (self, name, attribute_value);
- lsm_dom_node_changed (LSM_DOM_NODE (self));
+ arv_dom_node_changed (ARV_DOM_NODE (self));
}
const char *
-lsm_dom_element_get_tag_name (LsmDomElement *self)
+arv_dom_element_get_tag_name (ArvDomElement *self)
{
g_return_val_if_fail (LSM_IS_DOM_ELEMENT (self), NULL);
- return lsm_dom_node_get_node_name (LSM_DOM_NODE (self));
+ return arv_dom_node_get_node_name (ARV_DOM_NODE (self));
}
static void
-lsm_dom_element_init (LsmDomElement *element)
+arv_dom_element_init (ArvDomElement *element)
{
}
-/* LsmDomElement class */
+/* ArvDomElement class */
static void
-lsm_dom_element_class_init (LsmDomElementClass *klass)
+arv_dom_element_class_init (ArvDomElementClass *klass)
{
- LsmDomNodeClass *node_class = LSM_DOM_NODE_CLASS (klass);
+ ArvDomNodeClass *node_class = ARV_DOM_NODE_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
- node_class->get_node_value = lsm_dom_element_get_node_value;
- node_class->get_node_type = lsm_dom_element_get_node_type;
- node_class->write_to_stream = lsm_dom_element_write_to_stream;
+ node_class->get_node_value = arv_dom_element_get_node_value;
+ node_class->get_node_type = arv_dom_element_get_node_type;
+ node_class->write_to_stream = arv_dom_element_write_to_stream;
}
-G_DEFINE_ABSTRACT_TYPE (LsmDomElement, lsm_dom_element, LSM_TYPE_DOM_NODE)
+G_DEFINE_ABSTRACT_TYPE (ArvDomElement, arv_dom_element, LSM_TYPE_DOM_NODE)
diff --git a/src/lsmdomelement.h b/src/lsmdomelement.h
index 1ede041..98addda 100644
--- a/src/lsmdomelement.h
+++ b/src/lsmdomelement.h
@@ -1,4 +1,4 @@
-/* Lasem
+/* Aravis
*
* Copyright  2007-2008 Emmanuel Pacaud
*
@@ -21,40 +21,40 @@
* Emmanuel Pacaud <emmanuel gnome org>
*/
-#ifndef LSM_DOM_ELEMENT_H
-#define LSM_DOM_ELEMENT_H
+#ifndef ARV_DOM_ELEMENT_H
+#define ARV_DOM_ELEMENT_H
#include <lsmdom.h>
#include <lsmdomnode.h>
G_BEGIN_DECLS
-#define LSM_TYPE_DOM_ELEMENT (lsm_dom_element_get_type ())
-#define LSM_DOM_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LSM_TYPE_DOM_ELEMENT, LsmDomElement))
-#define LSM_DOM_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LSM_TYPE_DOM_ELEMENT, LsmDomElementClass))
+#define LSM_TYPE_DOM_ELEMENT (arv_dom_element_get_type ())
+#define ARV_DOM_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LSM_TYPE_DOM_ELEMENT, ArvDomElement))
+#define ARV_DOM_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LSM_TYPE_DOM_ELEMENT, ArvDomElementClass))
#define LSM_IS_DOM_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LSM_TYPE_DOM_ELEMENT))
#define LSM_IS_DOM_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LSM_TYPE_DOM_ELEMENT))
-#define LSM_DOM_ELEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), LSM_TYPE_DOM_ELEMENT, LsmDomElementClass))
+#define ARV_DOM_ELEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), LSM_TYPE_DOM_ELEMENT, ArvDomElementClass))
-typedef struct _LsmDomElementClass LsmDomElementClass;
+typedef struct _ArvDomElementClass ArvDomElementClass;
-struct _LsmDomElement {
- LsmDomNode node;
+struct _ArvDomElement {
+ ArvDomNode node;
};
-struct _LsmDomElementClass {
- LsmDomNodeClass parent_class;
+struct _ArvDomElementClass {
+ ArvDomNodeClass parent_class;
- const char* (*get_attribute) (LsmDomElement *self, const char *name);
- void (*set_attribute) (LsmDomElement *self, const char *name, const char *attribute_value);
- char * (*get_serialized_attributes) (LsmDomElement *self);
+ const char* (*get_attribute) (ArvDomElement *self, const char *name);
+ void (*set_attribute) (ArvDomElement *self, const char *name, const char *attribute_value);
+ char * (*get_serialized_attributes) (ArvDomElement *self);
};
-GType lsm_dom_element_get_type (void);
+GType arv_dom_element_get_type (void);
-const char * lsm_dom_element_get_tag_name (LsmDomElement *self);
-const char* lsm_dom_element_get_attribute (LsmDomElement* self, const char* name);
-void lsm_dom_element_set_attribute (LsmDomElement* self, const char* name, const char* attribute_value);
+const char * arv_dom_element_get_tag_name (ArvDomElement *self);
+const char* arv_dom_element_get_attribute (ArvDomElement* self, const char* name);
+void arv_dom_element_set_attribute (ArvDomElement* self, const char* name, const char* attribute_value);
G_END_DECLS
diff --git a/src/lsmdomenumtypes.c b/src/lsmdomenumtypes.c
index 95c5d42..3d22055 100644
--- a/src/lsmdomenumtypes.c
+++ b/src/lsmdomenumtypes.c
@@ -42,53 +42,53 @@ lsm_debug_level_get_type (void)
#include "lsmdomnode.h"
GType
-lsm_dom_node_type_get_type (void)
+arv_dom_node_type_get_type (void)
{
static GType the_type = 0;
if (the_type == 0)
{
static const GEnumValue values[] = {
- { LSM_DOM_NODE_TYPE_ELEMENT_NODE,
- "LSM_DOM_NODE_TYPE_ELEMENT_NODE",
+ { ARV_DOM_NODE_TYPE_ELEMENT_NODE,
+ "ARV_DOM_NODE_TYPE_ELEMENT_NODE",
"element-node" },
- { LSM_DOM_NODE_TYPE_ATTRIBUTE_NODE,
- "LSM_DOM_NODE_TYPE_ATTRIBUTE_NODE",
+ { ARV_DOM_NODE_TYPE_ATTRIBUTE_NODE,
+ "ARV_DOM_NODE_TYPE_ATTRIBUTE_NODE",
"attribute-node" },
- { LSM_DOM_NODE_TYPE_TEXT_NODE,
- "LSM_DOM_NODE_TYPE_TEXT_NODE",
+ { ARV_DOM_NODE_TYPE_TEXT_NODE,
+ "ARV_DOM_NODE_TYPE_TEXT_NODE",
"text-node" },
- { LSM_DOM_NODE_TYPE_CDATA_SECTION_NODE,
- "LSM_DOM_NODE_TYPE_CDATA_SECTION_NODE",
+ { ARV_DOM_NODE_TYPE_CDATA_SECTION_NODE,
+ "ARV_DOM_NODE_TYPE_CDATA_SECTION_NODE",
"cdata-section-node" },
- { LSM_DOM_NODE_TYPE_ENTITY_REFERENCE_NODE,
- "LSM_DOM_NODE_TYPE_ENTITY_REFERENCE_NODE",
+ { ARV_DOM_NODE_TYPE_ENTITY_REFERENCE_NODE,
+ "ARV_DOM_NODE_TYPE_ENTITY_REFERENCE_NODE",
"entity-reference-node" },
- { LSM_DOM_NODE_TYPE_ENTITY_NODE,
- "LSM_DOM_NODE_TYPE_ENTITY_NODE",
+ { ARV_DOM_NODE_TYPE_ENTITY_NODE,
+ "ARV_DOM_NODE_TYPE_ENTITY_NODE",
"entity-node" },
- { LSM_DOM_NODE_TYPE_PROCESSING_INSTRUCTION_NODE,
- "LSM_DOM_NODE_TYPE_PROCESSING_INSTRUCTION_NODE",
+ { ARV_DOM_NODE_TYPE_PROCESSING_INSTRUCTION_NODE,
+ "ARV_DOM_NODE_TYPE_PROCESSING_INSTRUCTION_NODE",
"processing-instruction-node" },
- { LSM_DOM_NODE_TYPE_COMMENT_NODE,
- "LSM_DOM_NODE_TYPE_COMMENT_NODE",
+ { ARV_DOM_NODE_TYPE_COMMENT_NODE,
+ "ARV_DOM_NODE_TYPE_COMMENT_NODE",
"comment-node" },
- { LSM_DOM_NODE_TYPE_DOCUMENT_NODE,
- "LSM_DOM_NODE_TYPE_DOCUMENT_NODE",
+ { ARV_DOM_NODE_TYPE_DOCUMENT_NODE,
+ "ARV_DOM_NODE_TYPE_DOCUMENT_NODE",
"document-node" },
- { LSM_DOM_NODE_TYPE_DOCUMENT_TYPE_NODE,
- "LSM_DOM_NODE_TYPE_DOCUMENT_TYPE_NODE",
+ { ARV_DOM_NODE_TYPE_DOCUMENT_TYPE_NODE,
+ "ARV_DOM_NODE_TYPE_DOCUMENT_TYPE_NODE",
"document-type-node" },
- { LSM_DOM_NODE_TYPE_DOCUMENT_FRAGMENT_NODE,
- "LSM_DOM_NODE_TYPE_DOCUMENT_FRAGMENT_NODE",
+ { ARV_DOM_NODE_TYPE_DOCUMENT_FRAGMENT_NODE,
+ "ARV_DOM_NODE_TYPE_DOCUMENT_FRAGMENT_NODE",
"document-fragment-node" },
- { LSM_DOM_NODE_TYPE_NOTATION_NODE,
- "LSM_DOM_NODE_TYPE_NOTATION_NODE",
+ { ARV_DOM_NODE_TYPE_NOTATION_NODE,
+ "ARV_DOM_NODE_TYPE_NOTATION_NODE",
"notation-node" },
{ 0, NULL, NULL }
};
the_type = g_enum_register_static (
- g_intern_static_string ("LsmDomNodeType"),
+ g_intern_static_string ("ArvDomNodeType"),
values);
}
return the_type;
diff --git a/src/lsmdomenumtypes.h b/src/lsmdomenumtypes.h
index 1575ad3..d335e0c 100644
--- a/src/lsmdomenumtypes.h
+++ b/src/lsmdomenumtypes.h
@@ -1,8 +1,8 @@
/* Generated data (by glib-mkenums) */
-#ifndef LSM_DOM_ENUM_TYPES_H
-#define LSM_DOM_ENUM_TYPES_H
+#ifndef ARV_DOM_ENUM_TYPES_H
+#define ARV_DOM_ENUM_TYPES_H
#include <glib-object.h>
@@ -15,12 +15,12 @@ GType lsm_debug_level_get_type (void) G_GNUC_CONST;
/* Enumerations from "lsmdomnode.h" */
-#define LSM_TYPE_DOM_NODE_TYPE (lsm_dom_node_type_get_type())
-GType lsm_dom_node_type_get_type (void) G_GNUC_CONST;
+#define LSM_TYPE_DOM_NODE_TYPE (arv_dom_node_type_get_type())
+GType arv_dom_node_type_get_type (void) G_GNUC_CONST;
G_END_DECLS
-#endif /* LSM_DOM_ENUM_TYPES_H */
+#endif /* ARV_DOM_ENUM_TYPES_H */
/* Generated data ends here */
diff --git a/src/lsmdomimplementation.c b/src/lsmdomimplementation.c
index 66b2566..aebee43 100644
--- a/src/lsmdomimplementation.c
+++ b/src/lsmdomimplementation.c
@@ -1,4 +1,4 @@
-/* Lasem
+/* Aravis
*
* Copyright  2007-2009 Emmanuel Pacaud
*
@@ -30,8 +30,8 @@
static GHashTable *document_types = NULL;
void
-lsm_dom_implementation_add_create_function (const char *qualified_name,
- LsmDomDocumentCreateFunction create_function)
+arv_dom_implementation_add_create_function (const char *qualified_name,
+ ArvDomDocumentCreateFunction create_function)
{
if (document_types == NULL)
document_types = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
@@ -39,22 +39,22 @@ lsm_dom_implementation_add_create_function (const char *qualified_name,
g_hash_table_insert (document_types, g_strdup (qualified_name), create_function);
}
-LsmDomDocument *
-lsm_dom_implementation_create_document (const char *namespace_uri,
+ArvDomDocument *
+arv_dom_implementation_create_document (const char *namespace_uri,
const char *qualified_name)
{
- LsmDomDocumentCreateFunction create_function;
+ ArvDomDocumentCreateFunction create_function;
g_return_val_if_fail (qualified_name != NULL, NULL);
if (document_types == NULL) {
- lsm_dom_implementation_add_create_function ("math", lsm_mathml_document_new);
- lsm_dom_implementation_add_create_function ("svg", lsm_svg_document_new);
+ arv_dom_implementation_add_create_function ("math", lsm_mathml_document_new);
+ arv_dom_implementation_add_create_function ("svg", lsm_svg_document_new);
}
create_function = g_hash_table_lookup (document_types, qualified_name);
if (create_function == NULL) {
- lsm_debug_dom ("[LsmDomImplementation::create_document] Unknow document type (%s)",
+ lsm_debug_dom ("[ArvDomImplementation::create_document] Unknow document type (%s)",
qualified_name);
return NULL;
}
@@ -63,7 +63,7 @@ lsm_dom_implementation_create_document (const char *namespace_uri,
}
void
-lsm_dom_implementation_cleanup (void)
+arv_dom_implementation_cleanup (void)
{
if (document_types == NULL)
return;
diff --git a/src/lsmdomimplementation.h b/src/lsmdomimplementation.h
index 61b6b03..c37e3fb 100644
--- a/src/lsmdomimplementation.h
+++ b/src/lsmdomimplementation.h
@@ -1,4 +1,4 @@
-/* Lasem
+/* Aravis
*
* Copyright  2007-2009 Emmanuel Pacaud
*
@@ -21,22 +21,22 @@
* Emmanuel Pacaud <emmanuel gnome org>
*/
-#ifndef LSM_DOM_IMPLEMENTATION_H
-#define LSM_DOM_IMPLEMENTATION_H
+#ifndef ARV_DOM_IMPLEMENTATION_H
+#define ARV_DOM_IMPLEMENTATION_H
#include <lsmdomtypes.h>
#include <lsmdomdocument.h>
G_BEGIN_DECLS
-typedef LsmDomDocument * (*LsmDomDocumentCreateFunction) (void);
+typedef ArvDomDocument * (*ArvDomDocumentCreateFunction) (void);
-LsmDomDocument * lsm_dom_implementation_create_document (const char *namespace_uri,
+ArvDomDocument * arv_dom_implementation_create_document (const char *namespace_uri,
const char *qualified_name);
-void lsm_dom_implementation_add_document_create_function (const char *qualified_name,
- LsmDomDocumentCreateFunction create_function);
+void arv_dom_implementation_add_document_create_function (const char *qualified_name,
+ ArvDomDocumentCreateFunction create_function);
-void lsm_dom_implementation_cleanup (void);
+void arv_dom_implementation_cleanup (void);
G_END_DECLS
diff --git a/src/lsmdomnamednodemap.c b/src/lsmdomnamednodemap.c
index fd7fd85..f2c01e2 100644
--- a/src/lsmdomnamednodemap.c
+++ b/src/lsmdomnamednodemap.c
@@ -1,4 +1,4 @@
-/* Lasem
+/* Aravis
*
* Copyright  2010 Emmanuel Pacaud
*
@@ -24,58 +24,58 @@
#include <lsmdomnamednodemap.h>
#include <lsmdomnode.h>
-/* LsmDomNamedNodeMap implementation */
+/* ArvDomNamedNodeMap implementation */
-LsmDomNode *
-lsm_dom_named_node_map_get_named_item (LsmDomNamedNodeMap *map, const char *name)
+ArvDomNode *
+arv_dom_named_node_map_get_named_item (ArvDomNamedNodeMap *map, const char *name)
{
g_return_val_if_fail (LSM_IS_DOM_NAMED_NODE_MAP (map), NULL);
- return LSM_DOM_NAMED_NODE_MAP_GET_CLASS (map)->get (map, name);
+ return ARV_DOM_NAMED_NODE_MAP_GET_CLASS (map)->get (map, name);
}
-LsmDomNode *
-lsm_dom_named_node_map_set_named_item (LsmDomNamedNodeMap *map, LsmDomNode *node)
+ArvDomNode *
+arv_dom_named_node_map_set_named_item (ArvDomNamedNodeMap *map, ArvDomNode *node)
{
g_return_val_if_fail (LSM_IS_DOM_NAMED_NODE_MAP (map), NULL);
- return LSM_DOM_NAMED_NODE_MAP_GET_CLASS (map)->set (map, node);
+ return ARV_DOM_NAMED_NODE_MAP_GET_CLASS (map)->set (map, node);
}
-LsmDomNode *
-lsm_dom_named_node_map_remove_named_item (LsmDomNamedNodeMap *map, const char *name)
+ArvDomNode *
+arv_dom_named_node_map_remove_named_item (ArvDomNamedNodeMap *map, const char *name)
{
g_return_val_if_fail (LSM_IS_DOM_NAMED_NODE_MAP (map), NULL);
- return LSM_DOM_NAMED_NODE_MAP_GET_CLASS (map)->remove (map, name);
+ return ARV_DOM_NAMED_NODE_MAP_GET_CLASS (map)->remove (map, name);
}
-LsmDomNode *
-lsm_dom_named_node_map_get_item (LsmDomNamedNodeMap *map, unsigned int index)
+ArvDomNode *
+arv_dom_named_node_map_get_item (ArvDomNamedNodeMap *map, unsigned int index)
{
g_return_val_if_fail (LSM_IS_DOM_NAMED_NODE_MAP (map), NULL);
- return LSM_DOM_NAMED_NODE_MAP_GET_CLASS (map)->get_item (map, index);
+ return ARV_DOM_NAMED_NODE_MAP_GET_CLASS (map)->get_item (map, index);
}
unsigned int
-lsm_dom_named_node_map_get_length (LsmDomNamedNodeMap *map)
+arv_dom_named_node_map_get_length (ArvDomNamedNodeMap *map)
{
g_return_val_if_fail (LSM_IS_DOM_NAMED_NODE_MAP (map), 0);
- return LSM_DOM_NAMED_NODE_MAP_GET_CLASS (map)->get_length (map);
+ return ARV_DOM_NAMED_NODE_MAP_GET_CLASS (map)->get_length (map);
}
static void
-lsm_dom_named_node_map_init (LsmDomNamedNodeMap *map)
+arv_dom_named_node_map_init (ArvDomNamedNodeMap *map)
{
}
-/* LsmDomNamedNodeMap class */
+/* ArvDomNamedNodeMap class */
static void
-lsm_dom_named_node_map_class_init (LsmDomNamedNodeMapClass *klass)
+arv_dom_named_node_map_class_init (ArvDomNamedNodeMapClass *klass)
{
}
-G_DEFINE_ABSTRACT_TYPE (LsmDomNamedNodeMap, lsm_dom_named_node_map, G_TYPE_OBJECT)
+G_DEFINE_ABSTRACT_TYPE (ArvDomNamedNodeMap, arv_dom_named_node_map, G_TYPE_OBJECT)
diff --git a/src/lsmdomnamednodemap.h b/src/lsmdomnamednodemap.h
index 2821089..8b3f6f7 100644
--- a/src/lsmdomnamednodemap.h
+++ b/src/lsmdomnamednodemap.h
@@ -1,4 +1,4 @@
-/* Lasem
+/* Aravis
*
* Copyright  2010 Emmanuel Pacaud
*
@@ -21,43 +21,43 @@
* Emmanuel Pacaud <emmanuel gnome org>
*/
-#ifndef LSM_DOM_NAMED_NODE_MAP_H
-#define LSM_DOM_NAMED_NODE_MAP_H
+#ifndef ARV_DOM_NAMED_NODE_MAP_H
+#define ARV_DOM_NAMED_NODE_MAP_H
#include <lsmdomtypes.h>
G_BEGIN_DECLS
-#define LSM_TYPE_DOM_NAMED_NODE_MAP (lsm_dom_named_node_map_get_type ())
-#define LSM_DOM_NAMED_NODE_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LSM_TYPE_DOM_NAMED_NODE_MAP, LsmDomNamedNodeMap))
-#define LSM_DOM_NAMED_NODE_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LSM_TYPE_DOM_NAMED_NODE_MAP, LsmDomNamedNodeMapClass))
+#define LSM_TYPE_DOM_NAMED_NODE_MAP (arv_dom_named_node_map_get_type ())
+#define ARV_DOM_NAMED_NODE_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LSM_TYPE_DOM_NAMED_NODE_MAP, ArvDomNamedNodeMap))
+#define ARV_DOM_NAMED_NODE_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LSM_TYPE_DOM_NAMED_NODE_MAP, ArvDomNamedNodeMapClass))
#define LSM_IS_DOM_NAMED_NODE_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LSM_TYPE_DOM_NAMED_NODE_MAP))
#define LSM_IS_DOM_NAMED_NODE_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LSM_TYPE_DOM_NAMED_NODE_MAP))
-#define LSM_DOM_NAMED_NODE_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), LSM_TYPE_DOM_NAMED_NODE_MAP, LsmDomNamedNodeMapClass))
+#define ARV_DOM_NAMED_NODE_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), LSM_TYPE_DOM_NAMED_NODE_MAP, ArvDomNamedNodeMapClass))
-typedef struct _LsmDomNamedNodeMapClass LsmDomNamedNodeMapClass;
+typedef struct _ArvDomNamedNodeMapClass ArvDomNamedNodeMapClass;
-struct _LsmDomNamedNodeMap {
+struct _ArvDomNamedNodeMap {
GObject object;
};
-struct _LsmDomNamedNodeMapClass {
+struct _ArvDomNamedNodeMapClass {
GObjectClass parent_class;
- LsmDomNode * (*get) (LsmDomNamedNodeMap *map, const char *name);
- LsmDomNode * (*set) (LsmDomNamedNodeMap *map, LsmDomNode *node);
- LsmDomNode * (*remove) (LsmDomNamedNodeMap *map, const char *name);
- LsmDomNode * (*get_item) (LsmDomNamedNodeMap *map, unsigned int index);
- unsigned int (*get_length) (LsmDomNamedNodeMap *map);
+ ArvDomNode * (*get) (ArvDomNamedNodeMap *map, const char *name);
+ ArvDomNode * (*set) (ArvDomNamedNodeMap *map, ArvDomNode *node);
+ ArvDomNode * (*remove) (ArvDomNamedNodeMap *map, const char *name);
+ ArvDomNode * (*get_item) (ArvDomNamedNodeMap *map, unsigned int index);
+ unsigned int (*get_length) (ArvDomNamedNodeMap *map);
};
-GType lsm_dom_named_node_map_get_type (void);
+GType arv_dom_named_node_map_get_type (void);
-LsmDomNode * lsm_dom_named_node_map_get_named_item (LsmDomNamedNodeMap *map, const char *name);
-LsmDomNode * lsm_dom_named_node_map_set_named_item (LsmDomNamedNodeMap *map, LsmDomNode *item);
-LsmDomNode * lsm_dom_named_node_map_remove_named_item (LsmDomNamedNodeMap *map, const char *name);
-LsmDomNode * lsm_dom_named_node_map_get_item (LsmDomNamedNodeMap *map, unsigned int index);
-unsigned int lsm_dom_named_node_map_get_length (LsmDomNamedNodeMap *map);
+ArvDomNode * arv_dom_named_node_map_get_named_item (ArvDomNamedNodeMap *map, const char *name);
+ArvDomNode * arv_dom_named_node_map_set_named_item (ArvDomNamedNodeMap *map, ArvDomNode *item);
+ArvDomNode * arv_dom_named_node_map_remove_named_item (ArvDomNamedNodeMap *map, const char *name);
+ArvDomNode * arv_dom_named_node_map_get_item (ArvDomNamedNodeMap *map, unsigned int index);
+unsigned int arv_dom_named_node_map_get_length (ArvDomNamedNodeMap *map);
G_END_DECLS
diff --git a/src/lsmdomnode.c b/src/lsmdomnode.c
index 933aa57..ce1a36a 100644
--- a/src/lsmdomnode.c
+++ b/src/lsmdomnode.c
@@ -1,4 +1,4 @@
-/* Lasem
+/* Aravis
*
* Copyright  2007-2010 Emmanuel Pacaud
*
@@ -33,45 +33,45 @@
#include <glib/gprintf.h>
#include <stdio.h>
-/* LsmDomNodeChildList */
+/* ArvDomNodeChildList */
-#define LSM_TYPE_DOM_NODE_CHILD_LIST (lsm_dom_node_child_list_get_type ())
-#define LSM_DOM_NODE_CHILD_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LSM_TYPE_DOM_NODE_CHILD_LIST, LsmDomNodeChildList))
-#define LSM_DOM_NODE_CHILD_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LSM_TYPE_DOM_NODE_CHILD_LIST, LsmDomNodeChildListClass))
+#define LSM_TYPE_DOM_NODE_CHILD_LIST (arv_dom_node_child_list_get_type ())
+#define ARV_DOM_NODE_CHILD_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LSM_TYPE_DOM_NODE_CHILD_LIST, ArvDomNodeChildList))
+#define ARV_DOM_NODE_CHILD_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LSM_TYPE_DOM_NODE_CHILD_LIST, ArvDomNodeChildListClass))
#define LSM_IS_DOM_NODE_CHILD_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LSM_TYPE_DOM_NODE_CHILD_LIST))
#define LSM_IS_DOM_NODE_CHILD_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LSM_TYPE_DOM_NODE_CHILD_LIST))
-#define LSM_DOM_NODE_CHILD_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), LSM_TYPE_DOM_NODE_CHILD_LIST, LsmDomNodeChildListClass))
+#define ARV_DOM_NODE_CHILD_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), LSM_TYPE_DOM_NODE_CHILD_LIST, ArvDomNodeChildListClass))
-typedef struct _LsmDomNodeChildListClass LsmDomNodeChildListClass;
+typedef struct _ArvDomNodeChildListClass ArvDomNodeChildListClass;
typedef struct {
- LsmDomNodeList base;
+ ArvDomNodeList base;
- LsmDomNode *parent_node;
-} LsmDomNodeChildList;
+ ArvDomNode *parent_node;
+} ArvDomNodeChildList;
-struct _LsmDomNodeChildListClass {
- LsmDomNodeListClass parent_class;
+struct _ArvDomNodeChildListClass {
+ ArvDomNodeListClass parent_class;
};
-GType lsm_dom_node_child_list_get_type (void);
+GType arv_dom_node_child_list_get_type (void);
static GObjectClass *child_list_parent_class = NULL;
static void
-lsm_dom_node_child_list_weak_notify_cb (void *user_data, GObject *object)
+arv_dom_node_child_list_weak_notify_cb (void *user_data, GObject *object)
{
- LsmDomNodeChildList *list = user_data;
+ ArvDomNodeChildList *list = user_data;
list->parent_node = NULL;
}
-static LsmDomNode *
-lsm_dom_node_child_list_get_item (LsmDomNodeList *list, unsigned int index)
+static ArvDomNode *
+arv_dom_node_child_list_get_item (ArvDomNodeList *list, unsigned int index)
{
- LsmDomNodeChildList *child_list = LSM_DOM_NODE_CHILD_LIST (list);
- LsmDomNode *iter;
+ ArvDomNodeChildList *child_list = ARV_DOM_NODE_CHILD_LIST (list);
+ ArvDomNode *iter;
unsigned int i = 0;
if (child_list->parent_node == NULL)
@@ -87,10 +87,10 @@ lsm_dom_node_child_list_get_item (LsmDomNodeList *list, unsigned int index)
}
static unsigned int
-lsm_dom_node_child_list_get_length (LsmDomNodeList *list)
+arv_dom_node_child_list_get_length (ArvDomNodeList *list)
{
- LsmDomNodeChildList *child_list = LSM_DOM_NODE_CHILD_LIST (list);
- LsmDomNode *iter;
+ ArvDomNodeChildList *child_list = ARV_DOM_NODE_CHILD_LIST (list);
+ ArvDomNode *iter;
unsigned int length = 0;
if (child_list->parent_node == NULL)
@@ -102,33 +102,33 @@ lsm_dom_node_child_list_get_length (LsmDomNodeList *list)
return length;
}
-LsmDomNodeList *
-lsm_dom_node_child_list_new (LsmDomNode *parent_node)
+ArvDomNodeList *
+arv_dom_node_child_list_new (ArvDomNode *parent_node)
{
- LsmDomNodeChildList *list;
+ ArvDomNodeChildList *list;
g_return_val_if_fail (LSM_IS_DOM_NODE (parent_node), NULL);
list = g_object_new (LSM_TYPE_DOM_NODE_CHILD_LIST, NULL);
list->parent_node = parent_node;
- g_object_weak_ref (G_OBJECT (parent_node), lsm_dom_node_child_list_weak_notify_cb, list);
+ g_object_weak_ref (G_OBJECT (parent_node), arv_dom_node_child_list_weak_notify_cb, list);
- return LSM_DOM_NODE_LIST (list);
+ return ARV_DOM_NODE_LIST (list);
}
static void
-lsm_dom_node_child_list_init (LsmDomNodeChildList *list)
+arv_dom_node_child_list_init (ArvDomNodeChildList *list)
{
}
static void
-lsm_dom_node_child_list_finalize (GObject *object)
+arv_dom_node_child_list_finalize (GObject *object)
{
- LsmDomNodeChildList *list = LSM_DOM_NODE_CHILD_LIST (object);
+ ArvDomNodeChildList *list = ARV_DOM_NODE_CHILD_LIST (object);
if (list->parent_node != NULL) {
- g_object_weak_unref (G_OBJECT (list->parent_node), lsm_dom_node_child_list_weak_notify_cb, list);
+ g_object_weak_unref (G_OBJECT (list->parent_node), arv_dom_node_child_list_weak_notify_cb, list);
list->parent_node = NULL;
}
@@ -136,38 +136,38 @@ lsm_dom_node_child_list_finalize (GObject *object)
}
static void
-lsm_dom_node_child_list_class_init (LsmDomNodeChildListClass *klass)
+arv_dom_node_child_list_class_init (ArvDomNodeChildListClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- LsmDomNodeListClass *node_list_class = LSM_DOM_NODE_LIST_CLASS (klass);
+ ArvDomNodeListClass *node_list_class = ARV_DOM_NODE_LIST_CLASS (klass);
child_list_parent_class = g_type_class_peek_parent (klass);
- object_class->finalize = lsm_dom_node_child_list_finalize;
+ object_class->finalize = arv_dom_node_child_list_finalize;
- node_list_class->get_item = lsm_dom_node_child_list_get_item;
- node_list_class->get_length = lsm_dom_node_child_list_get_length;
+ node_list_class->get_item = arv_dom_node_child_list_get_item;
+ node_list_class->get_length = arv_dom_node_child_list_get_length;
}
-G_DEFINE_TYPE (LsmDomNodeChildList, lsm_dom_node_child_list, LSM_TYPE_DOM_NODE_LIST)
+G_DEFINE_TYPE (ArvDomNodeChildList, arv_dom_node_child_list, LSM_TYPE_DOM_NODE_LIST)
static GObjectClass *parent_class = NULL;
-/* LsmDomNode implementation */
+/* ArvDomNode implementation */
/**
- * lsm_dom_node_get_node_name:
- * @self: a #LsmDomNode
+ * arv_dom_node_get_node_name:
+ * @self: a #ArvDomNode
* Return value: the node name.
*
* Gets the node name.
*/
const char*
-lsm_dom_node_get_node_name (LsmDomNode* self)
+arv_dom_node_get_node_name (ArvDomNode* self)
{
- LsmDomNodeClass *node_class = LSM_DOM_NODE_GET_CLASS (self);
+ ArvDomNodeClass *node_class = ARV_DOM_NODE_GET_CLASS (self);
g_return_val_if_fail (node_class != NULL, NULL);
@@ -178,17 +178,17 @@ lsm_dom_node_get_node_name (LsmDomNode* self)
}
/**
- * lsm_dom_node_get_node_value:
- * @self: a #LsmDomNode
+ * arv_dom_node_get_node_value:
+ * @self: a #ArvDomNode
* Return value: the node value.
*
* Gets the node value.
*/
const char*
-lsm_dom_node_get_node_value (LsmDomNode* self)
+arv_dom_node_get_node_value (ArvDomNode* self)
{
- LsmDomNodeClass *node_class = LSM_DOM_NODE_GET_CLASS (self);
+ ArvDomNodeClass *node_class = ARV_DOM_NODE_GET_CLASS (self);
g_return_val_if_fail (node_class != NULL, NULL);
@@ -199,9 +199,9 @@ lsm_dom_node_get_node_value (LsmDomNode* self)
}
void
-lsm_dom_node_set_node_value (LsmDomNode* self, const char* new_value)
+arv_dom_node_set_node_value (ArvDomNode* self, const char* new_value)
{
- LsmDomNodeClass *node_class = LSM_DOM_NODE_GET_CLASS (self);
+ ArvDomNodeClass *node_class = ARV_DOM_NODE_GET_CLASS (self);
g_return_if_fail (node_class != NULL);
g_return_if_fail (new_value != NULL);
@@ -210,9 +210,9 @@ lsm_dom_node_set_node_value (LsmDomNode* self, const char* new_value)
node_class->set_node_value (self, new_value);
}
-LsmDomNodeType lsm_dom_node_get_node_type (LsmDomNode* self)
+ArvDomNodeType arv_dom_node_get_node_type (ArvDomNode* self)
{
- LsmDomNodeClass *node_class = LSM_DOM_NODE_GET_CLASS (self);
+ ArvDomNodeClass *node_class = ARV_DOM_NODE_GET_CLASS (self);
g_return_val_if_fail (node_class != NULL, 0);
@@ -222,73 +222,73 @@ LsmDomNodeType lsm_dom_node_get_node_type (LsmDomNode* self)
return 0;
}
-LsmDomNode*
-lsm_dom_node_get_parent_node (LsmDomNode* self)
+ArvDomNode*
+arv_dom_node_get_parent_node (ArvDomNode* self)
{
g_return_val_if_fail (LSM_IS_DOM_NODE (self), NULL);
return self->parent_node;
}
-LsmDomNodeList*
-lsm_dom_node_get_child_nodes (LsmDomNode* self)
+ArvDomNodeList*
+arv_dom_node_get_child_nodes (ArvDomNode* self)
{
- LsmDomNodeList *list;
+ ArvDomNodeList *list;
g_return_val_if_fail (LSM_IS_DOM_NODE (self), NULL);
list = g_object_get_data (G_OBJECT (self), "child-nodes");
if (list == NULL) {
- list = lsm_dom_node_child_list_new (self);
+ list = arv_dom_node_child_list_new (self);
g_object_set_data_full (G_OBJECT (self), "child-nodes", list, g_object_unref);
}
return list;
}
-LsmDomNode*
-lsm_dom_node_get_first_child (LsmDomNode* self)
+ArvDomNode*
+arv_dom_node_get_first_child (ArvDomNode* self)
{
g_return_val_if_fail (LSM_IS_DOM_NODE (self), NULL);
return self->first_child;
}
-LsmDomNode*
-lsm_dom_node_get_last_child (LsmDomNode* self)
+ArvDomNode*
+arv_dom_node_get_last_child (ArvDomNode* self)
{
g_return_val_if_fail (LSM_IS_DOM_NODE (self), NULL);
return self->last_child;
}
-LsmDomNode*
-lsm_dom_node_get_previous_sibling (LsmDomNode* self)
+ArvDomNode*
+arv_dom_node_get_previous_sibling (ArvDomNode* self)
{
g_return_val_if_fail (LSM_IS_DOM_NODE (self), NULL);
return self->previous_sibling;
}
-LsmDomNode*
-lsm_dom_node_get_next_sibling (LsmDomNode* self)
+ArvDomNode*
+arv_dom_node_get_next_sibling (ArvDomNode* self)
{
g_return_val_if_fail (LSM_IS_DOM_NODE (self), NULL);
return self->next_sibling;
}
-/*LsmDomNamedNodeMap**/
-/*lsm_dom_node_get_attributes (LsmDomNode* self)*/
+/*ArvDomNamedNodeMap**/
+/*arv_dom_node_get_attributes (ArvDomNode* self)*/
/*{*/
-/* return LSM_DOM_NODE_GET_CLASS (self)->get_attributes (self);*/
+/* return ARV_DOM_NODE_GET_CLASS (self)->get_attributes (self);*/
/*}*/
-LsmDomDocument*
-lsm_dom_node_get_owner_document (LsmDomNode* self)
+ArvDomDocument*
+arv_dom_node_get_owner_document (ArvDomNode* self)
{
- LsmDomNode *parent;
+ ArvDomNode *parent;
g_return_val_if_fail (LSM_IS_DOM_NODE (self), NULL);
@@ -297,12 +297,12 @@ lsm_dom_node_get_owner_document (LsmDomNode* self)
!LSM_IS_DOM_DOCUMENT (parent);
parent = parent->parent_node);
- return LSM_DOM_DOCUMENT (parent);
+ return ARV_DOM_DOCUMENT (parent);
}
/**
- * lsm_dom_node_insert_before:
- * @self: a #LsmDomNode
+ * arv_dom_node_insert_before:
+ * @self: a #ArvDomNode
* @new_child: (transfer full): node to insert
* @ref_child: (transfer none): reference node, i.e., the node before which the new node must be inserted.
*
@@ -319,43 +319,43 @@ lsm_dom_node_get_owner_document (LsmDomNode* self)
* Check if new_child is an ancestor of self.
*/
-LsmDomNode*
-lsm_dom_node_insert_before (LsmDomNode* self, LsmDomNode* new_child, LsmDomNode* ref_child)
+ArvDomNode*
+arv_dom_node_insert_before (ArvDomNode* self, ArvDomNode* new_child, ArvDomNode* ref_child)
{
- LsmDomNodeClass *node_class;
+ ArvDomNodeClass *node_class;
if (ref_child == NULL)
- lsm_dom_node_append_child (self, new_child);
+ arv_dom_node_append_child (self, new_child);
g_return_val_if_fail (LSM_IS_DOM_NODE (new_child), NULL);
if (new_child->parent_node != NULL)
- lsm_dom_node_remove_child (self, new_child);
+ arv_dom_node_remove_child (self, new_child);
if (!LSM_IS_DOM_NODE (self)) {
- g_critical ("%s: self is not a LsmDomNode", G_STRFUNC);
+ g_critical ("%s: self is not a ArvDomNode", G_STRFUNC);
g_object_unref (new_child);
return NULL;
}
if (!LSM_IS_DOM_NODE (ref_child)) {
- g_critical ("%s: ref_child is not a LsmDomNode", G_STRFUNC);
+ g_critical ("%s: ref_child is not a ArvDomNode", G_STRFUNC);
g_object_unref (new_child);
return NULL;
}
if (ref_child->parent_node != self) {
- lsm_debug_dom ("[LsmDomNode::insert_before] Ref child '%s' doesn't belong to '%s'",
- lsm_dom_node_get_node_name (ref_child),
- lsm_dom_node_get_node_name (self));
+ lsm_debug_dom ("[ArvDomNode::insert_before] Ref child '%s' doesn't belong to '%s'",
+ arv_dom_node_get_node_name (ref_child),
+ arv_dom_node_get_node_name (self));
g_object_unref (new_child);
return NULL;
}
- if (!LSM_DOM_NODE_GET_CLASS (self)->can_append_child (self, new_child)) {
- lsm_debug_dom ("[LsmDomNode::insert_before] Can't append '%s' to '%s'",
- lsm_dom_node_get_node_name (new_child),
- lsm_dom_node_get_node_name (self));
+ if (!ARV_DOM_NODE_GET_CLASS (self)->can_append_child (self, new_child)) {
+ lsm_debug_dom ("[ArvDomNode::insert_before] Can't append '%s' to '%s'",
+ arv_dom_node_get_node_name (new_child),
+ arv_dom_node_get_node_name (self));
g_object_unref (new_child);
return NULL;
}
@@ -371,19 +371,19 @@ lsm_dom_node_insert_before (LsmDomNode* self, LsmDomNode* new_child, LsmDomNode*
ref_child->previous_sibling = new_child;
- node_class = LSM_DOM_NODE_GET_CLASS (self);
+ node_class = ARV_DOM_NODE_GET_CLASS (self);
if (node_class->post_new_child)
node_class->post_new_child (self, new_child);
- lsm_dom_node_changed (self);
+ arv_dom_node_changed (self);
return new_child;
}
/**
- * lsm_dom_node_replace_child:
- * @self: a #LsmDomNode
+ * arv_dom_node_replace_child:
+ * @self: a #ArvDomNode
* @new_child: (transfer full): a replacement node
* @old_child: (transfer none): node to replace
*
@@ -398,39 +398,39 @@ lsm_dom_node_insert_before (LsmDomNode* self, LsmDomNode* new_child, LsmDomNode*
* Check if new_child is an ancestor of self.
*/
-LsmDomNode*
-lsm_dom_node_replace_child (LsmDomNode* self, LsmDomNode* new_child, LsmDomNode* old_child)
+ArvDomNode*
+arv_dom_node_replace_child (ArvDomNode* self, ArvDomNode* new_child, ArvDomNode* old_child)
{
- LsmDomNode *next_sibling;
- LsmDomNode *node;
+ ArvDomNode *next_sibling;
+ ArvDomNode *node;
if (new_child == NULL)
- return lsm_dom_node_remove_child (self, old_child);
+ return arv_dom_node_remove_child (self, old_child);
if (!LSM_IS_DOM_NODE (new_child)) {
- g_critical ("%s: new_child is not a LsmDomNode", G_STRFUNC);
+ g_critical ("%s: new_child is not a ArvDomNode", G_STRFUNC);
if (LSM_IS_DOM_NODE (old_child))
g_object_unref (old_child);
return NULL;
}
if (new_child->parent_node != NULL)
- lsm_dom_node_remove_child (self, new_child);
+ arv_dom_node_remove_child (self, new_child);
if (old_child == NULL) {
- lsm_debug_dom ("[LsmDomNode::replace_child] old_child == NULL)");
+ lsm_debug_dom ("[ArvDomNode::replace_child] old_child == NULL)");
g_object_unref (new_child);
return NULL;
}
if (!LSM_IS_DOM_NODE (old_child)) {
- g_critical ("%s: old_child is not a LsmDomNode", G_STRFUNC);
+ g_critical ("%s: old_child is not a ArvDomNode", G_STRFUNC);
g_object_unref (new_child);
return NULL;
}
if (!LSM_IS_DOM_NODE (self)) {
- g_critical ("%s: self is not a LsmDomNode", G_STRFUNC);
+ g_critical ("%s: self is not a ArvDomNode", G_STRFUNC);
g_object_unref (new_child);
g_object_unref (old_child);
return NULL;
@@ -444,7 +444,7 @@ lsm_dom_node_replace_child (LsmDomNode* self, LsmDomNode* new_child, LsmDomNode*
next_sibling = old_child->next_sibling;
- node = lsm_dom_node_remove_child (self, old_child);
+ node = arv_dom_node_remove_child (self, old_child);
if (node != old_child) {
g_object_unref (new_child);
g_object_unref (old_child);
@@ -452,16 +452,16 @@ lsm_dom_node_replace_child (LsmDomNode* self, LsmDomNode* new_child, LsmDomNode*
}
if (next_sibling == NULL)
- lsm_dom_node_append_child (self, new_child);
+ arv_dom_node_append_child (self, new_child);
else
- lsm_dom_node_insert_before (self, new_child, next_sibling);
+ arv_dom_node_insert_before (self, new_child, next_sibling);
return old_child;
}
/**
- * lsm_dom_node_remove_child:
- * @self: a #LsmDomNode
+ * arv_dom_node_remove_child:
+ * @self: a #ArvDomNode
* @old_child: (transfer none): node to remove.
*
* Removes the child node indicated by @old_child from the list of children, and returns it.
@@ -469,11 +469,11 @@ lsm_dom_node_replace_child (LsmDomNode* self, LsmDomNode* new_child, LsmDomNode*
* Returns: (transfer full): the removed node.
*/
-LsmDomNode*
-lsm_dom_node_remove_child (LsmDomNode* self, LsmDomNode* old_child)
+ArvDomNode*
+arv_dom_node_remove_child (ArvDomNode* self, ArvDomNode* old_child)
{
- LsmDomNode *node;
- LsmDomNodeClass *node_class;
+ ArvDomNode *node;
+ ArvDomNodeClass *node_class;
g_return_val_if_fail (LSM_IS_DOM_NODE (self), NULL);
@@ -489,7 +489,7 @@ lsm_dom_node_remove_child (LsmDomNode* self, LsmDomNode* old_child)
if (node == NULL)
return NULL;
- node_class = LSM_DOM_NODE_GET_CLASS (self);
+ node_class = ARV_DOM_NODE_GET_CLASS (self);
if (node_class->pre_remove_child)
node_class->pre_remove_child (self, old_child);
@@ -508,14 +508,14 @@ lsm_dom_node_remove_child (LsmDomNode* self, LsmDomNode* old_child)
old_child->next_sibling = NULL;
old_child->previous_sibling = NULL;
- lsm_dom_node_changed (self);
+ arv_dom_node_changed (self);
return old_child;
}
/**
- * lsm_dom_node_append_child:
- * @self: a #LsmDomNode
+ * arv_dom_node_append_child:
+ * @self: a #ArvDomNode
* @new_child: (transfer full): node to append
*
* Adds the node @new_child to the end of the list of children of this node.
@@ -524,10 +524,10 @@ lsm_dom_node_remove_child (LsmDomNode* self, LsmDomNode* old_child)
* Returns: (transfer none): the added node.
*/
-LsmDomNode *
-lsm_dom_node_append_child (LsmDomNode* self, LsmDomNode* new_child)
+ArvDomNode *
+arv_dom_node_append_child (ArvDomNode* self, ArvDomNode* new_child)
{
- LsmDomNodeClass *node_class;
+ ArvDomNodeClass *node_class;
if (new_child == NULL)
return NULL;
@@ -535,18 +535,18 @@ lsm_dom_node_append_child (LsmDomNode* self, LsmDomNode* new_child)
g_return_val_if_fail (LSM_IS_DOM_NODE (new_child), NULL);
if (!LSM_IS_DOM_NODE (self)) {
- g_critical ("%s: self is not a LsmDomNode", G_STRFUNC);
+ g_critical ("%s: self is not a ArvDomNode", G_STRFUNC);
g_object_unref (new_child);
return NULL;
}
if (new_child->parent_node != NULL)
- lsm_dom_node_remove_child (self, new_child);
+ arv_dom_node_remove_child (self, new_child);
- if (!LSM_DOM_NODE_GET_CLASS (self)->can_append_child (self, new_child)) {
- lsm_debug_dom ("[LsmDomNode::append_child] Can't append '%s' to '%s'",
- lsm_dom_node_get_node_name (new_child),
- lsm_dom_node_get_node_name (self));
+ if (!ARV_DOM_NODE_GET_CLASS (self)->can_append_child (self, new_child)) {
+ lsm_debug_dom ("[ArvDomNode::append_child] Can't append '%s' to '%s'",
+ arv_dom_node_get_node_name (new_child),
+ arv_dom_node_get_node_name (self));
g_object_unref (new_child);
return NULL;
}
@@ -561,32 +561,32 @@ lsm_dom_node_append_child (LsmDomNode* self, LsmDomNode* new_child)
new_child->previous_sibling = self->last_child;
self->last_child = new_child;
- node_class = LSM_DOM_NODE_GET_CLASS (self);
+ node_class = ARV_DOM_NODE_GET_CLASS (self);
if (node_class->post_new_child)
node_class->post_new_child (self, new_child);
- lsm_dom_node_changed (self);
+ arv_dom_node_changed (self);
return new_child;
}
static gboolean
-lsm_dom_node_can_append_child_default (LsmDomNode *self, LsmDomNode* new_child)
+arv_dom_node_can_append_child_default (ArvDomNode *self, ArvDomNode* new_child)
{
return FALSE;
}
void
-lsm_dom_node_changed (LsmDomNode *self)
+arv_dom_node_changed (ArvDomNode *self)
{
- LsmDomNode *parent_node;
- LsmDomNode *child_node;
- LsmDomNodeClass *node_class;
+ ArvDomNode *parent_node;
+ ArvDomNode *child_node;
+ ArvDomNodeClass *node_class;
g_return_if_fail (LSM_IS_DOM_NODE (self));
- node_class = LSM_DOM_NODE_GET_CLASS (self);
+ node_class = ARV_DOM_NODE_GET_CLASS (self);
if (node_class->changed)
node_class->changed (self);
@@ -595,7 +595,7 @@ lsm_dom_node_changed (LsmDomNode *self)
for (parent_node = self->parent_node;
parent_node != NULL;
parent_node = parent_node->parent_node) {
- node_class = LSM_DOM_NODE_GET_CLASS (parent_node);
+ node_class = ARV_DOM_NODE_GET_CLASS (parent_node);
if (node_class->child_changed == NULL ||
!node_class->child_changed (parent_node, child_node))
break;
@@ -604,7 +604,7 @@ lsm_dom_node_changed (LsmDomNode *self)
}
gboolean
-lsm_dom_node_has_child_nodes (LsmDomNode* self)
+arv_dom_node_has_child_nodes (ArvDomNode* self)
{
g_return_val_if_fail (LSM_IS_DOM_NODE (self), FALSE);
@@ -612,37 +612,37 @@ lsm_dom_node_has_child_nodes (LsmDomNode* self)
}
static void
-lsm_dom_node_write_to_stream_default (LsmDomNode *self, GOutputStream *stream, GError **error)
+arv_dom_node_write_to_stream_default (ArvDomNode *self, GOutputStream *stream, GError **error)
{
- LsmDomNode *child;
+ ArvDomNode *child;
for (child = self->first_child; child != NULL; child = child->next_sibling)
- lsm_dom_node_write_to_stream (child, stream, error);
+ arv_dom_node_write_to_stream (child, stream, error);
}
void
-lsm_dom_node_write_to_stream (LsmDomNode *self, GOutputStream *stream, GError **error)
+arv_dom_node_write_to_stream (ArvDomNode *self, GOutputStream *stream, GError **error)
{
- LsmDomNodeClass *node_class;
+ ArvDomNodeClass *node_class;
g_return_if_fail (LSM_IS_DOM_NODE (self));
g_return_if_fail (G_IS_OUTPUT_STREAM (stream));
- node_class = LSM_DOM_NODE_GET_CLASS (self);
+ node_class = ARV_DOM_NODE_GET_CLASS (self);
if (node_class->write_to_stream != NULL)
node_class->write_to_stream (self, stream, error);
}
static void
-lsm_dom_node_init (LsmDomNode *node)
+arv_dom_node_init (ArvDomNode *node)
{
}
static void
-lsm_dom_node_finalize (GObject *object)
+arv_dom_node_finalize (GObject *object)
{
- LsmDomNode *node = LSM_DOM_NODE (object);
- LsmDomNode *child, *next_child;
+ ArvDomNode *node = ARV_DOM_NODE (object);
+ ArvDomNode *child, *next_child;
child = node->first_child;
while (child != NULL) {
@@ -654,19 +654,19 @@ lsm_dom_node_finalize (GObject *object)
parent_class->finalize (object);
}
-/* LsmDomNode class */
+/* ArvDomNode class */
static void
-lsm_dom_node_class_init (LsmDomNodeClass *node_class)
+arv_dom_node_class_init (ArvDomNodeClass *node_class)
{
GObjectClass *object_class = G_OBJECT_CLASS (node_class);
parent_class = g_type_class_peek_parent (node_class);
- object_class->finalize = lsm_dom_node_finalize;
+ object_class->finalize = arv_dom_node_finalize;
- node_class->can_append_child = lsm_dom_node_can_append_child_default;
- node_class->write_to_stream = lsm_dom_node_write_to_stream_default;
+ node_class->can_append_child = arv_dom_node_can_append_child_default;
+ node_class->write_to_stream = arv_dom_node_write_to_stream_default;
}
-G_DEFINE_ABSTRACT_TYPE (LsmDomNode, lsm_dom_node, G_TYPE_OBJECT)
+G_DEFINE_ABSTRACT_TYPE (ArvDomNode, arv_dom_node, G_TYPE_OBJECT)
diff --git a/src/lsmdomnode.h b/src/lsmdomnode.h
index de1458c..9caa63a 100644
--- a/src/lsmdomnode.h
+++ b/src/lsmdomnode.h
@@ -1,4 +1,4 @@
-/* Lasem
+/* Aravis
*
* Copyright  2007-2008 Emmanuel Pacaud
*
@@ -21,8 +21,8 @@
* Emmanuel Pacaud <emmanuel gnome org>
*/
-#ifndef LSM_DOM_NODE_H
-#define LSM_DOM_NODE_H
+#ifndef ARV_DOM_NODE_H
+#define ARV_DOM_NODE_H
#include <lsmdomtypes.h>
#include <gio/gio.h>
@@ -30,89 +30,89 @@
G_BEGIN_DECLS
typedef enum {
- LSM_DOM_NODE_TYPE_ELEMENT_NODE = 1,
- LSM_DOM_NODE_TYPE_ATTRIBUTE_NODE,
- LSM_DOM_NODE_TYPE_TEXT_NODE,
- LSM_DOM_NODE_TYPE_CDATA_SECTION_NODE,
- LSM_DOM_NODE_TYPE_ENTITY_REFERENCE_NODE,
- LSM_DOM_NODE_TYPE_ENTITY_NODE,
- LSM_DOM_NODE_TYPE_PROCESSING_INSTRUCTION_NODE,
- LSM_DOM_NODE_TYPE_COMMENT_NODE,
- LSM_DOM_NODE_TYPE_DOCUMENT_NODE,
- LSM_DOM_NODE_TYPE_DOCUMENT_TYPE_NODE,
- LSM_DOM_NODE_TYPE_DOCUMENT_FRAGMENT_NODE,
- LSM_DOM_NODE_TYPE_NOTATION_NODE
-} LsmDomNodeType;
-
-#define LSM_TYPE_DOM_NODE (lsm_dom_node_get_type ())
-#define LSM_DOM_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LSM_TYPE_DOM_NODE, LsmDomNode))
-#define LSM_DOM_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LSM_TYPE_DOM_NODE, LsmDomNodeClass))
+ ARV_DOM_NODE_TYPE_ELEMENT_NODE = 1,
+ ARV_DOM_NODE_TYPE_ATTRIBUTE_NODE,
+ ARV_DOM_NODE_TYPE_TEXT_NODE,
+ ARV_DOM_NODE_TYPE_CDATA_SECTION_NODE,
+ ARV_DOM_NODE_TYPE_ENTITY_REFERENCE_NODE,
+ ARV_DOM_NODE_TYPE_ENTITY_NODE,
+ ARV_DOM_NODE_TYPE_PROCESSING_INSTRUCTION_NODE,
+ ARV_DOM_NODE_TYPE_COMMENT_NODE,
+ ARV_DOM_NODE_TYPE_DOCUMENT_NODE,
+ ARV_DOM_NODE_TYPE_DOCUMENT_TYPE_NODE,
+ ARV_DOM_NODE_TYPE_DOCUMENT_FRAGMENT_NODE,
+ ARV_DOM_NODE_TYPE_NOTATION_NODE
+} ArvDomNodeType;
+
+#define LSM_TYPE_DOM_NODE (arv_dom_node_get_type ())
+#define ARV_DOM_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LSM_TYPE_DOM_NODE, ArvDomNode))
+#define ARV_DOM_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LSM_TYPE_DOM_NODE, ArvDomNodeClass))
#define LSM_IS_DOM_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LSM_TYPE_DOM_NODE))
#define LSM_IS_DOM_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LSM_TYPE_DOM_NODE))
-#define LSM_DOM_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), LSM_TYPE_DOM_NODE, LsmDomNodeClass))
+#define ARV_DOM_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), LSM_TYPE_DOM_NODE, ArvDomNodeClass))
-typedef struct _LsmDomNodeClass LsmDomNodeClass;
+typedef struct _ArvDomNodeClass ArvDomNodeClass;
-struct _LsmDomNode {
+struct _ArvDomNode {
GObject object;
- LsmDomNode *next_sibling;
- LsmDomNode *previous_sibling;
- LsmDomNode *parent_node;
- LsmDomNode *first_child;
- LsmDomNode *last_child;
+ ArvDomNode *next_sibling;
+ ArvDomNode *previous_sibling;
+ ArvDomNode *parent_node;
+ ArvDomNode *first_child;
+ ArvDomNode *last_child;
};
-struct _LsmDomNodeClass {
+struct _ArvDomNodeClass {
GObjectClass parent_class;
/* DOM node virtuals */
- const char* (*get_node_name) (LsmDomNode* self);
- const char* (*get_node_value) (LsmDomNode* self);
- void (*set_node_value) (LsmDomNode* self, const char* new_value);
- LsmDomNodeType (*get_node_type) (LsmDomNode* self);
+ const char* (*get_node_name) (ArvDomNode* self);
+ const char* (*get_node_value) (ArvDomNode* self);
+ void (*set_node_value) (ArvDomNode* self, const char* new_value);
+ ArvDomNodeType (*get_node_type) (ArvDomNode* self);
/* Validation virtuals */
- gboolean (*can_append_child) (LsmDomNode *self, LsmDomNode *new_child);
+ gboolean (*can_append_child) (ArvDomNode *self, ArvDomNode *new_child);
/* Implementation virtuals */
- void (*post_new_child) (LsmDomNode *parent, LsmDomNode *child);
- void (*pre_remove_child) (LsmDomNode *parent, LsmDomNode *child);
- void (*changed) (LsmDomNode *self);
- gboolean (*child_changed) (LsmDomNode *self, LsmDomNode *child);
+ void (*post_new_child) (ArvDomNode *parent, ArvDomNode *child);
+ void (*pre_remove_child) (ArvDomNode *parent, ArvDomNode *child);
+ void (*changed) (ArvDomNode *self);
+ gboolean (*child_changed) (ArvDomNode *self, ArvDomNode *child);
- void (*write_to_stream) (LsmDomNode *self, GOutputStream *stream, GError **error);
+ void (*write_to_stream) (ArvDomNode *self, GOutputStream *stream, GError **error);
};
-GType lsm_dom_node_get_type (void);
-
-const char * lsm_dom_node_get_node_name (LsmDomNode* self);
-const char * lsm_dom_node_get_node_value (LsmDomNode* self);
-void lsm_dom_node_set_node_value (LsmDomNode* self, const char* new_value);
-LsmDomNodeType lsm_dom_node_get_node_type (LsmDomNode* self);
-LsmDomNode * lsm_dom_node_get_parent_node (LsmDomNode* self);
-LsmDomNodeList * lsm_dom_node_get_child_nodes (LsmDomNode* self);
-LsmDomNode * lsm_dom_node_get_first_child (LsmDomNode* self);
-LsmDomNode * lsm_dom_node_get_last_child (LsmDomNode* self);
-LsmDomNode * lsm_dom_node_get_previous_sibling (LsmDomNode* self);
-LsmDomNode * lsm_dom_node_get_next_sibling (LsmDomNode* self);
+GType arv_dom_node_get_type (void);
+
+const char * arv_dom_node_get_node_name (ArvDomNode* self);
+const char * arv_dom_node_get_node_value (ArvDomNode* self);
+void arv_dom_node_set_node_value (ArvDomNode* self, const char* new_value);
+ArvDomNodeType arv_dom_node_get_node_type (ArvDomNode* self);
+ArvDomNode * arv_dom_node_get_parent_node (ArvDomNode* self);
+ArvDomNodeList * arv_dom_node_get_child_nodes (ArvDomNode* self);
+ArvDomNode * arv_dom_node_get_first_child (ArvDomNode* self);
+ArvDomNode * arv_dom_node_get_last_child (ArvDomNode* self);
+ArvDomNode * arv_dom_node_get_previous_sibling (ArvDomNode* self);
+ArvDomNode * arv_dom_node_get_next_sibling (ArvDomNode* self);
#if 0
-LsmDomNamedNodeMap * lsm_dom_node_get_attributes (LsmDomNode* self);
+ArvDomNamedNodeMap * arv_dom_node_get_attributes (ArvDomNode* self);
#endif
-LsmDomNode * lsm_dom_node_insert_before (LsmDomNode* self, LsmDomNode* new_child, LsmDomNode* ref_child);
-LsmDomNode * lsm_dom_node_replace_child (LsmDomNode* self, LsmDomNode* new_child, LsmDomNode* old_child);
-LsmDomNode * lsm_dom_node_append_child (LsmDomNode* self, LsmDomNode* new_child);
-LsmDomNode * lsm_dom_node_remove_child (LsmDomNode* self, LsmDomNode* old_child);
-gboolean lsm_dom_node_has_child_nodes (LsmDomNode* self);
+ArvDomNode * arv_dom_node_insert_before (ArvDomNode* self, ArvDomNode* new_child, ArvDomNode* ref_child);
+ArvDomNode * arv_dom_node_replace_child (ArvDomNode* self, ArvDomNode* new_child, ArvDomNode* old_child);
+ArvDomNode * arv_dom_node_append_child (ArvDomNode* self, ArvDomNode* new_child);
+ArvDomNode * arv_dom_node_remove_child (ArvDomNode* self, ArvDomNode* old_child);
+gboolean arv_dom_node_has_child_nodes (ArvDomNode* self);
-void lsm_dom_node_changed (LsmDomNode *self);
+void arv_dom_node_changed (ArvDomNode *self);
-LsmDomDocument * lsm_dom_node_get_owner_document (LsmDomNode* self);
+ArvDomDocument * arv_dom_node_get_owner_document (ArvDomNode* self);
-void lsm_dom_node_write_to_stream (LsmDomNode *self, GOutputStream *stream,
+void arv_dom_node_write_to_stream (ArvDomNode *self, GOutputStream *stream,
GError **error);
G_END_DECLS
diff --git a/src/lsmdomnodelist.c b/src/lsmdomnodelist.c
index e896c91..bb748bd 100644
--- a/src/lsmdomnodelist.c
+++ b/src/lsmdomnodelist.c
@@ -1,4 +1,4 @@
-/* Lasem
+/* Aravis
*
* Copyright  2010 Emmanuel Pacaud
*
@@ -24,34 +24,34 @@
#include <lsmdomnodelist.h>
#include <lsmdomnode.h>
-/* LsmDomNodeList implementation */
+/* ArvDomNodeList implementation */
-LsmDomNode *
-lsm_dom_node_list_get_item (LsmDomNodeList *list, unsigned int index)
+ArvDomNode *
+arv_dom_node_list_get_item (ArvDomNodeList *list, unsigned int index)
{
g_return_val_if_fail (LSM_IS_DOM_NODE_LIST (list), NULL);
- return LSM_DOM_NODE_LIST_GET_CLASS (list)->get_item (list, index);
+ return ARV_DOM_NODE_LIST_GET_CLASS (list)->get_item (list, index);
}
unsigned int
-lsm_dom_node_list_get_length (LsmDomNodeList *list)
+arv_dom_node_list_get_length (ArvDomNodeList *list)
{
g_return_val_if_fail (LSM_IS_DOM_NODE_LIST (list), 0);
- return LSM_DOM_NODE_LIST_GET_CLASS (list)->get_length (list);
+ return ARV_DOM_NODE_LIST_GET_CLASS (list)->get_length (list);
}
static void
-lsm_dom_node_list_init (LsmDomNodeList *list)
+arv_dom_node_list_init (ArvDomNodeList *list)
{
}
-/* LsmDomNodeList class */
+/* ArvDomNodeList class */
static void
-lsm_dom_node_list_class_init (LsmDomNodeListClass *klass)
+arv_dom_node_list_class_init (ArvDomNodeListClass *klass)
{
}
-G_DEFINE_ABSTRACT_TYPE (LsmDomNodeList, lsm_dom_node_list, G_TYPE_OBJECT)
+G_DEFINE_ABSTRACT_TYPE (ArvDomNodeList, arv_dom_node_list, G_TYPE_OBJECT)
diff --git a/src/lsmdomnodelist.h b/src/lsmdomnodelist.h
index df52bed..ade3523 100644
--- a/src/lsmdomnodelist.h
+++ b/src/lsmdomnodelist.h
@@ -1,4 +1,4 @@
-/* Lasem
+/* Aravis
*
* Copyright  2010 Emmanuel Pacaud
*
@@ -21,37 +21,37 @@
* Emmanuel Pacaud <emmanuel gnome org>
*/
-#ifndef LSM_DOM_NODE_LIST_H
-#define LSM_DOM_NODE_LIST_H
+#ifndef ARV_DOM_NODE_LIST_H
+#define ARV_DOM_NODE_LIST_H
#include <lsmdomtypes.h>
G_BEGIN_DECLS
-#define LSM_TYPE_DOM_NODE_LIST (lsm_dom_node_list_get_type ())
-#define LSM_DOM_NODE_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LSM_TYPE_DOM_NODE_LIST, LsmDomNodeList))
-#define LSM_DOM_NODE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LSM_TYPE_DOM_NODE_LIST, LsmDomNodeListClass))
+#define LSM_TYPE_DOM_NODE_LIST (arv_dom_node_list_get_type ())
+#define ARV_DOM_NODE_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LSM_TYPE_DOM_NODE_LIST, ArvDomNodeList))
+#define ARV_DOM_NODE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LSM_TYPE_DOM_NODE_LIST, ArvDomNodeListClass))
#define LSM_IS_DOM_NODE_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LSM_TYPE_DOM_NODE_LIST))
#define LSM_IS_DOM_NODE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LSM_TYPE_DOM_NODE_LIST))
-#define LSM_DOM_NODE_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), LSM_TYPE_DOM_NODE_LIST, LsmDomNodeListClass))
+#define ARV_DOM_NODE_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), LSM_TYPE_DOM_NODE_LIST, ArvDomNodeListClass))
-typedef struct _LsmDomNodeListClass LsmDomNodeListClass;
+typedef struct _ArvDomNodeListClass ArvDomNodeListClass;
-struct _LsmDomNodeList {
+struct _ArvDomNodeList {
GObject object;
};
-struct _LsmDomNodeListClass {
+struct _ArvDomNodeListClass {
GObjectClass parent_class;
- LsmDomNode * (*get_item) (LsmDomNodeList *list, unsigned int index);
- unsigned int (*get_length) (LsmDomNodeList *list);
+ ArvDomNode * (*get_item) (ArvDomNodeList *list, unsigned int index);
+ unsigned int (*get_length) (ArvDomNodeList *list);
};
-GType lsm_dom_node_list_get_type (void);
+GType arv_dom_node_list_get_type (void);
-LsmDomNode * lsm_dom_node_list_get_item (LsmDomNodeList *list, unsigned int index);
-unsigned int lsm_dom_node_list_get_length (LsmDomNodeList *list);
+ArvDomNode * arv_dom_node_list_get_item (ArvDomNodeList *list, unsigned int index);
+unsigned int arv_dom_node_list_get_length (ArvDomNodeList *list);
G_END_DECLS
diff --git a/src/lsmdomparser.c b/src/lsmdomparser.c
index 8f42734..829b984 100644
--- a/src/lsmdomparser.c
+++ b/src/lsmdomparser.c
@@ -1,4 +1,4 @@
-/* Lasem
+/* Aravis
*
* Copyright  2007-2009 Emmanuel Pacaud
*
@@ -35,20 +35,20 @@
typedef enum {
STATE
-} LsmDomSaxParserStateEnum;
+} ArvDomSaxParserStateEnum;
typedef struct {
- LsmDomSaxParserStateEnum state;
+ ArvDomSaxParserStateEnum state;
- LsmDomDocument *document;
- LsmDomNode *current_node;
+ ArvDomDocument *document;
+ ArvDomNode *current_node;
gboolean is_error;
int error_depth;
GHashTable *entities;
-} LsmDomSaxParserState;
+} ArvDomSaxParserState;
void
_free_entity (void *data)
@@ -64,9 +64,9 @@ _free_entity (void *data)
}
static void
-lsm_dom_parser_start_document (void *user_data)
+arv_dom_parser_start_document (void *user_data)
{
- LsmDomSaxParserState *state = user_data;
+ ArvDomSaxParserState *state = user_data;
state->state = STATE;
state->document = NULL;
@@ -76,20 +76,20 @@ lsm_dom_parser_start_document (void *user_data)
}
static void
-lsm_dom_parser_end_document (void *user_data)
+arv_dom_parser_end_document (void *user_data)
{
- LsmDomSaxParserState *state = user_data;
+ ArvDomSaxParserState *state = user_data;
g_hash_table_unref (state->entities);
}
static void
-lsm_dom_parser_start_element(void *user_data,
+arv_dom_parser_start_element(void *user_data,
const xmlChar *name,
const xmlChar **attrs)
{
- LsmDomSaxParserState *state = user_data;
- LsmDomNode *node;
+ ArvDomSaxParserState *state = user_data;
+ ArvDomNode *node;
int i;
if (state->is_error) {
@@ -98,18 +98,18 @@ lsm_dom_parser_start_element(void *user_data,
}
if (state->document == NULL) {
- state->document = lsm_dom_implementation_create_document (NULL, (char *) name);
- state->current_node = LSM_DOM_NODE (state->document);
+ state->document = arv_dom_implementation_create_document (NULL, (char *) name);
+ state->current_node = ARV_DOM_NODE (state->document);
g_return_if_fail (LSM_IS_DOM_DOCUMENT (state->document));
}
- node = LSM_DOM_NODE (lsm_dom_document_create_element (LSM_DOM_DOCUMENT (state->document), (char *) name));
+ node = ARV_DOM_NODE (arv_dom_document_create_element (ARV_DOM_DOCUMENT (state->document), (char *) name));
- if (LSM_IS_DOM_NODE (node) && lsm_dom_node_append_child (state->current_node, node) != NULL) {
+ if (LSM_IS_DOM_NODE (node) && arv_dom_node_append_child (state->current_node, node) != NULL) {
if (attrs != NULL)
for (i = 0; attrs[i] != NULL && attrs[i+1] != NULL; i += 2)
- lsm_dom_element_set_attribute (LSM_DOM_ELEMENT (node),
+ arv_dom_element_set_attribute (ARV_DOM_ELEMENT (node),
(char *) attrs[i],
(char *) attrs[i+1]);
@@ -123,10 +123,10 @@ lsm_dom_parser_start_element(void *user_data,
}
static void
-lsm_dom_parser_end_element (void *user_data,
+arv_dom_parser_end_element (void *user_data,
const xmlChar *name)
{
- LsmDomSaxParserState *state = user_data;
+ ArvDomSaxParserState *state = user_data;
if (state->is_error) {
state->error_depth--;
@@ -138,31 +138,31 @@ lsm_dom_parser_end_element (void *user_data,
return;
}
- state->current_node = lsm_dom_node_get_parent_node (state->current_node);
+ state->current_node = arv_dom_node_get_parent_node (state->current_node);
}
static void
-lsm_dom_parser_characters (void *user_data, const xmlChar *ch, int len)
+arv_dom_parser_characters (void *user_data, const xmlChar *ch, int len)
{
- LsmDomSaxParserState *state = user_data;
+ ArvDomSaxParserState *state = user_data;
if (!state->is_error) {
- LsmDomNode *node;
+ ArvDomNode *node;
char *text;
text = g_strndup ((char *) ch, len);
- node = LSM_DOM_NODE (lsm_dom_document_create_text_node (LSM_DOM_DOCUMENT (state->document), text));
+ node = ARV_DOM_NODE (arv_dom_document_create_text_node (ARV_DOM_DOCUMENT (state->document), text));
- lsm_dom_node_append_child (state->current_node, node);
+ arv_dom_node_append_child (state->current_node, node);
g_free (text);
}
}
static xmlEntityPtr
-lsm_dom_parser_get_entity (void *user_data, const xmlChar *name)
+arv_dom_parser_get_entity (void *user_data, const xmlChar *name)
{
- LsmDomSaxParserState *state = user_data;
+ ArvDomSaxParserState *state = user_data;
xmlEntity *entity;
const char *utf8;
@@ -183,11 +183,11 @@ lsm_dom_parser_get_entity (void *user_data, const xmlChar *name)
}
void
-lsm_dom_parser_declare_entity (void * user_data, const xmlChar * name, int type,
+arv_dom_parser_declare_entity (void * user_data, const xmlChar * name, int type,
const xmlChar * publicId, const xmlChar * systemId,
xmlChar * content)
{
- LsmDomSaxParserState *state = user_data;
+ ArvDomSaxParserState *state = user_data;
if (content != NULL) {
xmlEntity *entity;
@@ -200,7 +200,7 @@ lsm_dom_parser_declare_entity (void * user_data, const xmlChar * name, int type,
#if 1
static void
-lsm_dom_parser_warning (void *user_data, const char *msg, ...)
+arv_dom_parser_warning (void *user_data, const char *msg, ...)
{
va_list args;
@@ -210,7 +210,7 @@ lsm_dom_parser_warning (void *user_data, const char *msg, ...)
}
static void
-lsm_dom_parser_error (void *user_data, const char *msg, ...)
+arv_dom_parser_error (void *user_data, const char *msg, ...)
{
va_list args;
@@ -220,7 +220,7 @@ lsm_dom_parser_error (void *user_data, const char *msg, ...)
}
static void
-lsm_dom_parser_fatal_error (void *user_data, const char *msg, ...)
+arv_dom_parser_fatal_error (void *user_data, const char *msg, ...)
{
va_list args;
@@ -232,21 +232,21 @@ lsm_dom_parser_fatal_error (void *user_data, const char *msg, ...)
static xmlSAXHandler sax_handler = {
#if 1
- .warning = lsm_dom_parser_warning,
- .error = lsm_dom_parser_error,
- .fatalError = lsm_dom_parser_fatal_error,
+ .warning = arv_dom_parser_warning,
+ .error = arv_dom_parser_error,
+ .fatalError = arv_dom_parser_fatal_error,
#endif
- .startDocument = lsm_dom_parser_start_document,
- .endDocument = lsm_dom_parser_end_document,
- .startElement = lsm_dom_parser_start_element,
- .endElement = lsm_dom_parser_end_element,
- .characters = lsm_dom_parser_characters,
- .getEntity = lsm_dom_parser_get_entity,
- .entityDecl = lsm_dom_parser_declare_entity
+ .startDocument = arv_dom_parser_start_document,
+ .endDocument = arv_dom_parser_end_document,
+ .startElement = arv_dom_parser_start_element,
+ .endElement = arv_dom_parser_end_element,
+ .characters = arv_dom_parser_characters,
+ .getEntity = arv_dom_parser_get_entity,
+ .entityDecl = arv_dom_parser_declare_entity
};
static GQuark
-lsm_dom_document_error_quark (void)
+arv_dom_document_error_quark (void)
{
static GQuark q = 0;
@@ -257,16 +257,16 @@ lsm_dom_document_error_quark (void)
return q;
}
-#define LSM_DOM_DOCUMENT_ERROR lsm_dom_document_error_quark ()
+#define ARV_DOM_DOCUMENT_ERROR arv_dom_document_error_quark ()
typedef enum {
- LSM_DOM_DOCUMENT_ERROR_INVALID_XML
-} LsmDomDocumentError;
+ ARV_DOM_DOCUMENT_ERROR_INVALID_XML
+} ArvDomDocumentError;
-LsmDomDocument *
-lsm_dom_document_new_from_memory (const void *buffer, int size, GError **error)
+ArvDomDocument *
+arv_dom_document_new_from_memory (const void *buffer, int size, GError **error)
{
- static LsmDomSaxParserState state;
+ static ArvDomSaxParserState state;
g_return_val_if_fail (buffer != NULL, NULL);
@@ -280,85 +280,85 @@ lsm_dom_document_new_from_memory (const void *buffer, int size, GError **error)
g_object_unref (state.document);
state.document = NULL;
- lsm_debug_dom ("[LsmDomParser::from_memory] Invalid document");
+ lsm_debug_dom ("[ArvDomParser::from_memory] Invalid document");
g_set_error (error,
- LSM_DOM_DOCUMENT_ERROR,
- LSM_DOM_DOCUMENT_ERROR_INVALID_XML,
+ ARV_DOM_DOCUMENT_ERROR,
+ ARV_DOM_DOCUMENT_ERROR_INVALID_XML,
"Invalid document.");
}
return state.document;
}
-static LsmDomDocument *
-lsm_dom_document_new_from_file (GFile *file, GError **error)
+static ArvDomDocument *
+arv_dom_document_new_from_file (GFile *file, GError **error)
{
- LsmDomDocument *document;
+ ArvDomDocument *document;
gsize size = 0;
char *contents = NULL;
if (!g_file_load_contents (file, NULL, &contents, &size, NULL, error))
return NULL;
- document = lsm_dom_document_new_from_memory (contents, size, error);
+ document = arv_dom_document_new_from_memory (contents, size, error);
g_free (contents);
return document;
}
-LsmDomDocument *
-lsm_dom_document_new_from_path (const char *path, GError **error)
+ArvDomDocument *
+arv_dom_document_new_from_path (const char *path, GError **error)
{
- LsmDomDocument *document;
+ ArvDomDocument *document;
GFile *file;
g_return_val_if_fail (path != NULL, NULL);
file = g_file_new_for_path (path);
- document = lsm_dom_document_new_from_file (file, error);
+ document = arv_dom_document_new_from_file (file, error);
g_object_unref (file);
if (document != NULL)
- lsm_dom_document_set_path (document, path);
+ arv_dom_document_set_path (document, path);
return document;
}
-LsmDomDocument *
-lsm_dom_document_new_from_url (const char *url, GError **error)
+ArvDomDocument *
+arv_dom_document_new_from_url (const char *url, GError **error)
{
- LsmDomDocument *document;
+ ArvDomDocument *document;
GFile *file;
g_return_val_if_fail (url != NULL, NULL);
file = g_file_new_for_uri (url);
- document = lsm_dom_document_new_from_file (file, error);
+ document = arv_dom_document_new_from_file (file, error);
g_object_unref (file);
if (document != NULL)
- lsm_dom_document_set_url (document, url);
+ arv_dom_document_set_url (document, url);
return document;
}
void
-lsm_dom_document_save_to_stream (LsmDomDocument *document, GOutputStream *stream, GError **error)
+arv_dom_document_save_to_stream (ArvDomDocument *document, GOutputStream *stream, GError **error)
{
g_return_if_fail (LSM_IS_DOM_DOCUMENT (document));
g_return_if_fail (G_IS_OUTPUT_STREAM (stream));
- lsm_dom_node_write_to_stream (LSM_DOM_NODE (document), stream, error);
+ arv_dom_node_write_to_stream (ARV_DOM_NODE (document), stream, error);
}
void
-lsm_dom_document_save_to_memory (LsmDomDocument *document, void **buffer, int *size, GError **error)
+arv_dom_document_save_to_memory (ArvDomDocument *document, void **buffer, int *size, GError **error)
{
GOutputStream *stream;
@@ -378,7 +378,7 @@ lsm_dom_document_save_to_memory (LsmDomDocument *document, void **buffer, int *s
return;
}
- lsm_dom_document_save_to_stream (document, G_OUTPUT_STREAM (stream), error);
+ arv_dom_document_save_to_stream (document, G_OUTPUT_STREAM (stream), error);
g_output_stream_close (G_OUTPUT_STREAM (stream), NULL, error);
if (size != NULL)
@@ -389,7 +389,7 @@ lsm_dom_document_save_to_memory (LsmDomDocument *document, void **buffer, int *s
}
void
-lsm_dom_document_save_to_path (LsmDomDocument *document, const char *path, GError **error)
+arv_dom_document_save_to_path (ArvDomDocument *document, const char *path, GError **error)
{
GFile *file;
GFileOutputStream *stream;
@@ -399,14 +399,14 @@ lsm_dom_document_save_to_path (LsmDomDocument *document, const char *path, GErro
file = g_file_new_for_path (path);
stream = g_file_create (file, G_FILE_CREATE_REPLACE_DESTINATION, NULL, error);
if (stream != NULL) {
- lsm_dom_document_save_to_stream (document, G_OUTPUT_STREAM (stream), error);
+ arv_dom_document_save_to_stream (document, G_OUTPUT_STREAM (stream), error);
g_object_unref (stream);
}
g_object_unref (file);
}
void
-lsm_dom_document_save_to_url (LsmDomDocument *document, const char *path, GError **error)
+arv_dom_document_save_to_url (ArvDomDocument *document, const char *path, GError **error)
{
GFile *file;
GFileOutputStream *stream;
@@ -416,7 +416,7 @@ lsm_dom_document_save_to_url (LsmDomDocument *document, const char *path, GError
file = g_file_new_for_uri (path);
stream = g_file_create (file, G_FILE_CREATE_REPLACE_DESTINATION, NULL, error);
if (stream != NULL) {
- lsm_dom_document_save_to_stream (document, G_OUTPUT_STREAM (stream), error);
+ arv_dom_document_save_to_stream (document, G_OUTPUT_STREAM (stream), error);
g_object_unref (stream);
}
g_object_unref (file);
diff --git a/src/lsmdomparser.h b/src/lsmdomparser.h
index 5ff6b6c..c7bb21b 100644
--- a/src/lsmdomparser.h
+++ b/src/lsmdomparser.h
@@ -1,4 +1,4 @@
-/* Lasem
+/* Aravis
*
* Copyright  2007-2009 Emmanuel Pacaud
*
@@ -21,29 +21,29 @@
* Emmanuel Pacaud <emmanuel gnome org>
*/
-#ifndef LSM_DOM_PARSER_H
-#define LSM_DOM_PARSER_H
+#ifndef ARV_DOM_PARSER_H
+#define ARV_DOM_PARSER_H
#include <lsmdomdocument.h>
#include <gio/gio.h>
G_BEGIN_DECLS
-LsmDomDocument * lsm_dom_document_new_from_memory (const void *buffer, int size, GError **error);
-LsmDomDocument * lsm_dom_document_new_from_path (const char *path, GError **error);
-LsmDomDocument * lsm_dom_document_new_from_url (const char *url, GError **error);
+ArvDomDocument * arv_dom_document_new_from_memory (const void *buffer, int size, GError **error);
+ArvDomDocument * arv_dom_document_new_from_path (const char *path, GError **error);
+ArvDomDocument * arv_dom_document_new_from_url (const char *url, GError **error);
-void lsm_dom_document_save_to_stream (LsmDomDocument *document,
+void arv_dom_document_save_to_stream (ArvDomDocument *document,
GOutputStream *stream,
GError **error);
-void lsm_dom_document_save_to_memory (LsmDomDocument *documennt,
+void arv_dom_document_save_to_memory (ArvDomDocument *documennt,
void **buffer,
int *size,
GError **error);
-void lsm_dom_document_save_to_path (LsmDomDocument *documennt,
+void arv_dom_document_save_to_path (ArvDomDocument *documennt,
const char *path,
GError **error);
-void lsm_dom_document_save_to_url (LsmDomDocument *documennt,
+void arv_dom_document_save_to_url (ArvDomDocument *documennt,
const char *path,
GError **error);
diff --git a/src/lsmdomtext.c b/src/lsmdomtext.c
index dec4dc3..b48497e 100644
--- a/src/lsmdomtext.c
+++ b/src/lsmdomtext.c
@@ -1,4 +1,4 @@
-/* Lasem
+/* Aravis
*
* Copyright  2007-2008 Emmanuel Pacaud
*
@@ -28,55 +28,55 @@
#include <lsmdomtext.h>
-/* LsmDomNode implementation */
+/* ArvDomNode implementation */
static const char *
-lsm_dom_text_get_node_name (LsmDomNode *node)
+arv_dom_text_get_node_name (ArvDomNode *node)
{
return "#text";
}
static const char *
-lsm_dom_text_get_node_value (LsmDomNode *node)
+arv_dom_text_get_node_value (ArvDomNode *node)
{
- return LSM_DOM_CHARACTER_DATA (node)->data;
+ return ARV_DOM_CHARACTER_DATA (node)->data;
}
-static LsmDomNodeType
-lsm_dom_text_get_node_type (LsmDomNode *node)
+static ArvDomNodeType
+arv_dom_text_get_node_type (ArvDomNode *node)
{
- return LSM_DOM_NODE_TYPE_TEXT_NODE;
+ return ARV_DOM_NODE_TYPE_TEXT_NODE;
}
-/* LsmDomText implementation */
+/* ArvDomText implementation */
-LsmDomNode *
-lsm_dom_text_new (const char *data)
+ArvDomNode *
+arv_dom_text_new (const char *data)
{
- LsmDomNode *node;
+ ArvDomNode *node;
node = g_object_new (LSM_TYPE_DOM_TEXT, NULL);
- lsm_dom_character_data_set_data (LSM_DOM_CHARACTER_DATA (node), data);
+ arv_dom_character_data_set_data (ARV_DOM_CHARACTER_DATA (node), data);
return node;
}
static void
-lsm_dom_text_init (LsmDomText *text_node)
+arv_dom_text_init (ArvDomText *text_node)
{
}
-/* LsmDomText class */
+/* ArvDomText class */
static void
-lsm_dom_text_class_init (LsmDomTextClass *klass)
+arv_dom_text_class_init (ArvDomTextClass *klass)
{
- LsmDomNodeClass *node_class = LSM_DOM_NODE_CLASS (klass);
+ ArvDomNodeClass *node_class = ARV_DOM_NODE_CLASS (klass);
- node_class->get_node_name = lsm_dom_text_get_node_name;
- node_class->get_node_value = lsm_dom_text_get_node_value;
- node_class->get_node_type = lsm_dom_text_get_node_type;
+ node_class->get_node_name = arv_dom_text_get_node_name;
+ node_class->get_node_value = arv_dom_text_get_node_value;
+ node_class->get_node_type = arv_dom_text_get_node_type;
}
-G_DEFINE_TYPE (LsmDomText, lsm_dom_text, LSM_TYPE_DOM_CHARACTER_DATA)
+G_DEFINE_TYPE (ArvDomText, arv_dom_text, LSM_TYPE_DOM_CHARACTER_DATA)
diff --git a/src/lsmdomtext.h b/src/lsmdomtext.h
index a793347..ed254d6 100644
--- a/src/lsmdomtext.h
+++ b/src/lsmdomtext.h
@@ -1,4 +1,4 @@
-/* Lasem
+/* Aravis
*
* Copyright  2007-2008 Emmanuel Pacaud
*
@@ -21,33 +21,33 @@
* Emmanuel Pacaud <emmanuel gnome org>
*/
-#ifndef LSM_DOM_TEXT_H
-#define LSM_DOM_TEXT_H
+#ifndef ARV_DOM_TEXT_H
+#define ARV_DOM_TEXT_H
#include <lsmdomcharacterdata.h>
G_BEGIN_DECLS
-#define LSM_TYPE_DOM_TEXT (lsm_dom_text_get_type ())
-#define LSM_DOM_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LSM_TYPE_DOM_TEXT, LsmDomText))
-#define LSM_DOM_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LSM_TYPE_DOM_TEXT, LsmDomTextClass))
+#define LSM_TYPE_DOM_TEXT (arv_dom_text_get_type ())
+#define ARV_DOM_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LSM_TYPE_DOM_TEXT, ArvDomText))
+#define ARV_DOM_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LSM_TYPE_DOM_TEXT, ArvDomTextClass))
#define LSM_IS_DOM_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LSM_TYPE_DOM_TEXT))
#define LSM_IS_DOM_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LSM_TYPE_DOM_TEXT))
-#define LSM_DOM_TEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), LSM_TYPE_DOM_TEXT, LsmDomTextClass))
+#define ARV_DOM_TEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), LSM_TYPE_DOM_TEXT, ArvDomTextClass))
-typedef struct _LsmDomTextClass LsmDomTextClass;
+typedef struct _ArvDomTextClass ArvDomTextClass;
-struct _LsmDomText {
- LsmDomCharacterData character_data;
+struct _ArvDomText {
+ ArvDomCharacterData character_data;
};
-struct _LsmDomTextClass {
- LsmDomCharacterDataClass parent_class;
+struct _ArvDomTextClass {
+ ArvDomCharacterDataClass parent_class;
};
-GType lsm_dom_text_get_type (void);
+GType arv_dom_text_get_type (void);
-LsmDomNode *lsm_dom_text_new (const char *data);
+ArvDomNode *arv_dom_text_new (const char *data);
G_END_DECLS
diff --git a/src/lsmdomtypes.h b/src/lsmdomtypes.h
index 1c71b1d..8518854 100644
--- a/src/lsmdomtypes.h
+++ b/src/lsmdomtypes.h
@@ -1,4 +1,4 @@
-/* Lasem - SVG and Mathml library
+/* Aravis
*
* Copyright  2010 Emmanuel Pacaud
*
@@ -21,23 +21,23 @@
* Emmanuel Pacaud <emmanuel gnome org>
*/
-#ifndef LSM_DOM_TYPES_H
-#define LSM_DOM_TYPES_H
+#ifndef ARV_DOM_TYPES_H
+#define ARV_DOM_TYPES_H
#include <glib-object.h>
G_BEGIN_DECLS
-typedef struct _LsmDomNode LsmDomNode;
-typedef struct _LsmDomNodeList LsmDomNodeList;
-typedef struct _LsmDomNamedNodeMap LsmDomNamedNodeMap;
-typedef struct _LsmDomElement LsmDomElement;
-typedef struct _LsmDomDocument LsmDomDocument;
-typedef struct _LsmDomDocumentFragment LsmDomDocumentFragment;
-typedef struct _LsmDomCharacterData LsmDomCharacterData;
-typedef struct _LsmDomText LsmDomText;
+typedef struct _ArvDomNode ArvDomNode;
+typedef struct _ArvDomNodeList ArvDomNodeList;
+typedef struct _ArvDomNamedNodeMap ArvDomNamedNodeMap;
+typedef struct _ArvDomElement ArvDomElement;
+typedef struct _ArvDomDocument ArvDomDocument;
+typedef struct _ArvDomDocumentFragment ArvDomDocumentFragment;
+typedef struct _ArvDomCharacterData ArvDomCharacterData;
+typedef struct _ArvDomText ArvDomText;
-typedef struct _LsmDomView LsmDomView;
+typedef struct _ArvDomView ArvDomView;
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]