[aravis] dom: remove broken and unused DOM API.



commit 819dd47ed88038a10be744747a83d2ffa1adaae2
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Tue Apr 2 16:25:21 2013 +0200

    dom: remove broken and unused DOM API.

 docs/reference/aravis/aravis-sections.txt |    2 -
 src/arvdomdocument.c                      |   49 -----------------------------
 src/arvdomdocument.h                      |    6 ---
 src/arvgvinterface.c                      |    6 ++-
 4 files changed, 4 insertions(+), 59 deletions(-)
---
diff --git a/docs/reference/aravis/aravis-sections.txt b/docs/reference/aravis/aravis-sections.txt
index 4aae251..cd564e8 100644
--- a/docs/reference/aravis/aravis-sections.txt
+++ b/docs/reference/aravis/aravis-sections.txt
@@ -1290,8 +1290,6 @@ arv_dom_document_save_to_url
 arv_dom_document_get_document_element
 arv_dom_document_create_element
 arv_dom_document_create_text_node
-arv_dom_document_get_element_by_id
-arv_dom_document_register_element
 arv_dom_document_get_url
 arv_dom_document_set_url
 arv_dom_document_set_path
diff --git a/src/arvdomdocument.c b/src/arvdomdocument.c
index 426f010..0ebf011 100644
--- a/src/arvdomdocument.c
+++ b/src/arvdomdocument.c
@@ -115,50 +115,6 @@ arv_dom_document_create_text_node (ArvDomDocument *self, const char *data)
        return ARV_DOM_DOCUMENT_GET_CLASS (self)->create_text_node (self, data);
 }
 
-/**
- * arv_dom_document_get_element_by_id:
- * @self: a #ArvDomDocument
- * @id: xml:id of the wanted element
- *
- * Returns: (transfer none): the element wich has id as xml:id attribute.
- */
-
-ArvDomElement *
-arv_dom_document_get_element_by_id (ArvDomDocument *self, const char *id)
-{
-       g_return_val_if_fail (ARV_IS_DOM_DOCUMENT (self), NULL);
-       g_return_val_if_fail (id != NULL, NULL);
-
-       arv_debug_dom ("[ArvDomDocument::get_element_by_id] Lookup '%s'", id);
-
-       return g_hash_table_lookup (self->ids, id);
-}
-
-void
-arv_dom_document_register_element (ArvDomDocument *self, ArvDomElement *element, const char *id)
-{
-       char *old_id;
-
-       g_return_if_fail (ARV_IS_DOM_DOCUMENT (self));
-
-       old_id = g_hash_table_lookup (self->elements, element);
-       if (old_id != NULL) {
-               arv_debug_dom ("[ArvDomDocument::register_element] Unregister '%s'", old_id);
-
-               g_hash_table_remove (self->elements, element);
-               g_hash_table_remove (self->ids, old_id);
-       }
-
-       if (id != NULL) {
-               char *new_id = g_strdup (id);
-
-               arv_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);
-       }
-}
-
 const char *
 arv_dom_document_get_url (ArvDomDocument *self)
 {
@@ -243,8 +199,6 @@ arv_dom_document_get_href_data (ArvDomDocument *self, const char *href, gsize *s
 static void
 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
@@ -252,9 +206,6 @@ arv_dom_document_finalize (GObject *object)
 {
        ArvDomDocument *document = ARV_DOM_DOCUMENT (object);
 
-       g_hash_table_unref (document->elements);
-       g_hash_table_unref (document->ids);
-
        g_free (document->url);
 
        parent_class->finalize (object);
diff --git a/src/arvdomdocument.h b/src/arvdomdocument.h
index 384a51b..5df1d0e 100644
--- a/src/arvdomdocument.h
+++ b/src/arvdomdocument.h
@@ -41,9 +41,6 @@ typedef struct _ArvDomDocumentClass ArvDomDocumentClass;
 struct _ArvDomDocument {
        ArvDomNode node;
 
-       GHashTable *    ids;
-       GHashTable *    elements;
-
        char *          url;
 
 };
@@ -61,9 +58,6 @@ GType arv_dom_document_get_type (void);
 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           arv_dom_document_register_element       (ArvDomDocument *self, ArvDomElement *element, const 
char *id);
 
 const char *   arv_dom_document_get_url                (ArvDomDocument *self);
 void           arv_dom_document_set_url                (ArvDomDocument *self, const char *url);
diff --git a/src/arvgvinterface.c b/src/arvgvinterface.c
index bd69a8d..e38a561 100644
--- a/src/arvgvinterface.c
+++ b/src/arvgvinterface.c
@@ -322,8 +322,10 @@ arv_gv_interface_discover (ArvGvInterface *gv_interface)
                                                address_string = g_inet_address_to_string (interface_address);
 
                                                arv_debug_interface ("[GvInterface::discovery] Device '%s' 
found "
-                                                                    "(interface %s)",
-                                                                    device_infos->name, address_string);
+                                                                    "(interface %s) user_name '%s' - 
MAC_name '%s'",
+                                                                    device_infos->name, address_string,
+                                                                    device_infos->user_name,
+                                                                    device_infos->mac_string);
 
                                                g_free (address_string);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]