[gxml] Moved GXml.Dom to GXmlDom namespace. Better Autotools and GObject Introspection support.



commit 7754ead458d5ddba1cb1c8f170008fea8ee39576
Author: Daniel Espinosa Ortiz <despinosa git gnome org>
Date:   Thu Nov 17 16:47:39 2011 -0600

    Moved GXml.Dom to GXmlDom namespace. Better Autotools and GObject Introspection support.
    
    * In order to generate correctly GI typelib, GXml.Dom namespace was moved to GXmlDom
    * Now you can install correctly the library and development files
    * Now GI is supported. GIR and typelib files are installed by default.

 gxml/Attr.vala                  |    3 ++-
 gxml/BackedNode.vala            |    5 ++---
 gxml/CDATASection.vala          |    2 +-
 gxml/CharacterData.vala         |    3 +--
 gxml/Comment.vala               |    3 +--
 gxml/Document.vala              |    2 +-
 gxml/DocumentFragment.vala      |    3 +--
 gxml/DocumentType.vala          |    3 +--
 gxml/DomError.vala              |    5 ++---
 gxml/Element.vala               |    3 +--
 gxml/Entity.vala                |    3 +--
 gxml/EntityReference.vala       |    3 +--
 gxml/Implementation.vala        |    3 +--
 gxml/Makefile.am                |   27 ++++++++++++++++-----------
 gxml/NamespaceAttr.vala         |    3 +--
 gxml/NodeList.vala              |    4 ++--
 gxml/NodeType.vala              |    5 ++---
 gxml/Notation.vala              |    3 +--
 gxml/ProcessingInstruction.vala |    3 +--
 gxml/Text.vala                  |    3 +--
 gxml/XNode.vala                 |    3 +--
 21 files changed, 41 insertions(+), 51 deletions(-)
---
diff --git a/gxml/Attr.vala b/gxml/Attr.vala
index 15fa371..1ac7d9e 100644
--- a/gxml/Attr.vala
+++ b/gxml/Attr.vala
@@ -12,7 +12,7 @@
 /* NOTE: figure out how entity references work with Attrs */
 /* NOTE: value as children nodes: can contain Text and EntityReferences */
 
-namespace GXml.Dom {
+namespace GXmlDom {
 	/**
 	 * Represents an XML Attr node. These represent name=value
 	 * attributes associated with XML Elements. Values are often
@@ -220,4 +220,5 @@ namespace GXml.Dom {
 			return this; // STUB
 		}
 	}
+
 }
diff --git a/gxml/BackedNode.vala b/gxml/BackedNode.vala
index 554f804..11fd7f6 100644
--- a/gxml/BackedNode.vala
+++ b/gxml/BackedNode.vala
@@ -2,8 +2,7 @@
 
 // NOTE: be careful about what extra data subclasses keep
 
-
-namespace GXml.Dom {
+namespace GXmlDom {
 	/**
 	 * An internal class for nodes whose content is stored in a
 	 * corresponding Xml.Node. This would normally be hidden, but
@@ -123,7 +122,7 @@ namespace GXml.Dom {
 		/**
 		 * { inheritDoc}
 		 */
-		public override Dom.NodeType node_type {
+		public override NodeType node_type {
 			get {
 				/* Right now, Dom.NodeType's 12 values map perfectly to libxml2's first 12 types */
 				return (NodeType)this.node->type;
diff --git a/gxml/CDATASection.vala b/gxml/CDATASection.vala
index 5268dac..0d86b6d 100644
--- a/gxml/CDATASection.vala
+++ b/gxml/CDATASection.vala
@@ -1,6 +1,6 @@
 /* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
 
-namespace GXml.Dom {
+namespace GXmlDom {
 	/* TODO: do we really want a cdata section node, or just use strings? */
 	/* TODO: check about casing in #vala */
 	/**
diff --git a/gxml/CharacterData.vala b/gxml/CharacterData.vala
index 58ce6e0..66f8482 100644
--- a/gxml/CharacterData.vala
+++ b/gxml/CharacterData.vala
@@ -1,6 +1,5 @@
 /* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-
-namespace GXml.Dom {
+namespace GXmlDom {
 	/**
 	 * CharacterData defines an interface for manipulating XML character data. It is used by
 	 * the CDATASection, Text, and Comment node types. For more, see: [[http://www.w3.org/TR/DOM-Level-1/level-one-core.html#ID-FF21A306]]
diff --git a/gxml/Comment.vala b/gxml/Comment.vala
index a743337..5b6d7cb 100644
--- a/gxml/Comment.vala
+++ b/gxml/Comment.vala
@@ -1,6 +1,5 @@
 /* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-
-namespace GXml.Dom {
+namespace GXmlDom {
 	/* TODO: do we really want a comment node, or just use strings? */
 	/**
 	 * An XML comment. An XML example looks like: {{{
diff --git a/gxml/Document.vala b/gxml/Document.vala
index 08cd166..f3b8b7e 100644
--- a/gxml/Document.vala
+++ b/gxml/Document.vala
@@ -27,7 +27,7 @@
 /**
  * The XML Document Object Model.
  */
-namespace GXml.Dom {
+namespace GXmlDom {
 	internal struct InputStreamBox {
 		public InputStream str;
 		public Cancellable can;
diff --git a/gxml/DocumentFragment.vala b/gxml/DocumentFragment.vala
index 3ba1c26..1796095 100644
--- a/gxml/DocumentFragment.vala
+++ b/gxml/DocumentFragment.vala
@@ -1,6 +1,5 @@
 /* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-
-namespace GXml.Dom {
+namespace GXmlDom {
 	/* Lightweight Document object for fragments
 
 	   has a root for the fragment, the fragment of the document is a child to this root
diff --git a/gxml/DocumentType.vala b/gxml/DocumentType.vala
index 52545fd..ded2799 100644
--- a/gxml/DocumentType.vala
+++ b/gxml/DocumentType.vala
@@ -1,6 +1,5 @@
 /* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-
-namespace GXml.Dom {
+namespace GXmlDom {
 	/**
 	 * Defines a Document, such as the entities that it can use.
 	 * For more, see: [[http://www.w3.org/TR/DOM-Level-1/level-one-core.html#ID-412266927]]
diff --git a/gxml/DomError.vala b/gxml/DomError.vala
index 2500647..ba58d56 100644
--- a/gxml/DomError.vala
+++ b/gxml/DomError.vala
@@ -3,8 +3,7 @@
 /* implements DomException
    note usage at:
    http://www.w3.org/TR/DOM-Level-1/level-one-core.html#ID-BBACDC08 */
-
-namespace GXml.Dom {
+namespace GXmlDom {
 	/**
 	 * Describes various error states. For more, see
 	 * [[http://www.w3.org/TR/DOM-Level-1/level-one-core.html#ID-BBACDC08]]
@@ -68,4 +67,4 @@ namespace GXml.Dom {
 		 */
 		INVALID_ROOT
 	}
-}
\ No newline at end of file
+}
diff --git a/gxml/Element.vala b/gxml/Element.vala
index 13ff31b..24d7546 100644
--- a/gxml/Element.vala
+++ b/gxml/Element.vala
@@ -1,6 +1,5 @@
 /* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-
-namespace GXml.Dom {
+namespace GXmlDom {
 	// TODO: figure out how to create this; Xml.Doc doesn't have new_element()
 
 	/**
diff --git a/gxml/Entity.vala b/gxml/Entity.vala
index 8868eff..7d49dad 100644
--- a/gxml/Entity.vala
+++ b/gxml/Entity.vala
@@ -1,6 +1,5 @@
 /* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-
-namespace GXml.Dom {
+namespace GXmlDom {
 	/**
 	 * The content referenced by an EntityReference, and defined
 	 * in a DocumentType.
diff --git a/gxml/EntityReference.vala b/gxml/EntityReference.vala
index d4d0ec1..2b9452a 100644
--- a/gxml/EntityReference.vala
+++ b/gxml/EntityReference.vala
@@ -1,6 +1,5 @@
 /* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-
-namespace GXml.Dom {
+namespace GXmlDom {
 	/* TODO: do we need an EntityReference? find out what it's used for */
 	// TODO: figure out some way to represent this from libxml2, or handle it ourselves
 	//       may not even need it while based on libxml2
diff --git a/gxml/Implementation.vala b/gxml/Implementation.vala
index c02dd43..75e0915 100644
--- a/gxml/Implementation.vala
+++ b/gxml/Implementation.vala
@@ -1,6 +1,5 @@
 /* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-
-namespace GXml.Dom {
+namespace GXmlDom {
 	/**
 	 * Describes the features available in this
 	 * implementation. This can be accessed from a Document
diff --git a/gxml/Makefile.am b/gxml/Makefile.am
index 0351adb..ec627d9 100644
--- a/gxml/Makefile.am
+++ b/gxml/Makefile.am
@@ -27,6 +27,7 @@ lib_LTLIBRARIES = libgxml.la
 
 VALAFLAGS = \
     $(top_srcdir)/vapi/config.vapi \
+    --vapidir=$(top_srcdir)/vapi \
     --pkg libxml-2.0 \
     --pkg gee-1.0 \
     --pkg gobject-2.0 \
@@ -62,7 +63,7 @@ libgxml_la_SOURCES = \
 	$(NULL)	
 
 gxml-1.0.vapi gxml.vala.stamp GXml-1.0.gir: $(libgxml_la_VALASOURCES)
-	$(VALA_COMPILER) $(VALAFLAGS) -C -H gxml.h --gir=GXml-1.0.gir --vapidir=$(top_srcdir)/vapi --library gxml-1.0 $^
+	$(VALA_COMPILER) $(VALAFLAGS) -C -H $(top_builddir)/gxml/gxml-dom.h --gir=GXmlDom-1.0.gir  --library gxmldom-1.0 $^
 	@touch $@
 
 
@@ -85,8 +86,8 @@ include_HEADERS = \
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libgxml-1.0.pc
 
-gxmlincludedir=$(includedir)/libgxml-1.0/libgxml
-gxmlinclude_HEADERS= libgxml.h
+gxmlincludedir=$(includedir)/libgxml-1.0/gxml
+gxmlinclude_HEADERS= gxml-dom.h
 
 # GObject Introspection
 
@@ -98,23 +99,27 @@ girdir = $(datadir)/gir-1.0
 typelibsdir = $(libdir)/girepository-1.0
 endif
 
-# GIR files are generated automatically by Valac then is not necessary to scan source code to generate it
+# GIR files are generated automatically by Valac so is not necessary to scan source code to generate it
 INTROSPECTION_GIRS =
-INTROSPECTION_GIRS += GXml-1.0.gir
-INTROSPECTION_COMPILER_ARGS = 
+INTROSPECTION_GIRS += GXmlDom-1.0.gir
+INTROSPECTION_COMPILER_ARGS = \
+    --includedir=. \
+    --includedir=$(top_builddir)/gxml 
 
-GXml-1.0.typelib: $(INTROSPECTION_GIRS)
-	$(INTROSPECTION_COMPILER) $(INTROSPECTION_COMPILER_ARGS) --includedir=. $< -o $@
+GXmlDom-1.0.typelib: $(INTROSPECTION_GIRS)
+	$(INTROSPECTION_COMPILER) $(INTROSPECTION_COMPILER_ARGS)  $< -o $@
 
 gir_DATA = $(INTROSPECTION_GIRS)
-typelibs_DATA = GXml-1.0.typelib
+typelibs_DATA = GXmlDom-1.0.typelib
 
+vapidir = $(VALA_VAPIDIR)
+vapi_DATA=gxmldom-1.0.vapi
 
 CLEANFILES += $(INTROSPECTION_GIRS) $(typelibs_DATA) gxml-1.0.vapi
 
 EXTRA_DIST = \
 	libgxml-1.0.pc.in \
 	$(libgxml_la_VALASOURCES) \
-	gxml-1.0.vapi \
-	GXml-1.0.gir \
+	$(typelibs_DATA) \
+	$(INTROSPECTION_GIRS) \
 	gxml.vala.stamp
diff --git a/gxml/NamespaceAttr.vala b/gxml/NamespaceAttr.vala
index 7fac1e5..1730ce2 100644
--- a/gxml/NamespaceAttr.vala
+++ b/gxml/NamespaceAttr.vala
@@ -1,6 +1,5 @@
 /* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-
-namespace GXml.Dom {
+namespace GXmlDom {
 	/**
 	 * Represents an XML Namespace Attr node. These represent
 	 * prefix=uri pairs that define namespaces for XML Elements
diff --git a/gxml/NodeList.vala b/gxml/NodeList.vala
index b15c12a..e188313 100644
--- a/gxml/NodeList.vala
+++ b/gxml/NodeList.vala
@@ -2,7 +2,7 @@
 
 using Gee;
 
-namespace GXml.Dom {
+namespace GXmlDom {
 	/**
 	 * The NodeList is a live list used to store nodes, often the
 	 * children of a node, or a list of nodes matching a tag name.
@@ -619,4 +619,4 @@ namespace GXml.Dom {
 			return _str;
 		}
 	}
-}
\ No newline at end of file
+}
diff --git a/gxml/NodeType.vala b/gxml/NodeType.vala
index c1bf186..d72680b 100644
--- a/gxml/NodeType.vala
+++ b/gxml/NodeType.vala
@@ -1,6 +1,5 @@
 /* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-
-namespace GXml.Dom {
+namespace GXmlDom {
 	// TODO: want a method to convert NodeType to a string
 
 	/**
@@ -24,4 +23,4 @@ namespace GXml.Dom {
 		DOCUMENT_FRAGMENT,
 		NOTATION;
 	}
-}
\ No newline at end of file
+}
diff --git a/gxml/Notation.vala b/gxml/Notation.vala
index f92dfbd..5a01083 100644
--- a/gxml/Notation.vala
+++ b/gxml/Notation.vala
@@ -1,6 +1,5 @@
 /* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-
-namespace GXml.Dom {
+namespace GXmlDom {
 	// TODO: see if we can actually support these via libxml2, I can't seem to get to them through Xml.DTD
 	/**
 	 * Used collectively in defining DocumentTypes. A Notation can
diff --git a/gxml/ProcessingInstruction.vala b/gxml/ProcessingInstruction.vala
index e64f42e..48006d4 100644
--- a/gxml/ProcessingInstruction.vala
+++ b/gxml/ProcessingInstruction.vala
@@ -1,6 +1,5 @@
 /* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-
-namespace GXml.Dom {
+namespace GXmlDom {
 	// TODO: libxml2 doesn't seem to have PI objects, but does
 	//       have a function to call when one is parsed.  Let's not
 	//       worry about supporting this for right now.
diff --git a/gxml/Text.vala b/gxml/Text.vala
index effaf05..288ecbc 100644
--- a/gxml/Text.vala
+++ b/gxml/Text.vala
@@ -1,6 +1,5 @@
 /* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-
-namespace GXml.Dom {
+namespace GXmlDom {
 	/* TODO: do we really want a text node, or just use strings? */
 
 	/**
diff --git a/gxml/XNode.vala b/gxml/XNode.vala
index 7763d2f..f5d5d02 100644
--- a/gxml/XNode.vala
+++ b/gxml/XNode.vala
@@ -1,6 +1,5 @@
 /* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-
-namespace GXml.Dom {
+namespace GXmlDom {
 	/* TODO: consider adding public signals for new/deleted children */
 
 	/**



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