[valadoc] Api: Add methods to support dbus interfaces documentation



commit c5d6de06e40decc950325e1f068425edb09a34e1
Author: Luca Bruno <lethalman88 gmail com>
Date:   Tue May 4 22:12:00 2010 +0200

    Api: Add methods to support dbus interfaces documentation

 src/libvaladoc/api/class.vala         |    4 ++++
 src/libvaladoc/api/errorcode.vala     |    4 ++++
 src/libvaladoc/api/errordomain.vala   |    4 ++++
 src/libvaladoc/api/interface.vala     |    4 ++++
 src/libvaladoc/api/method.vala        |   14 ++++++++++++++
 src/libvaladoc/api/property.vala      |   10 ++++++++++
 src/libvaladoc/api/signal.vala        |   10 ++++++++++
 src/libvaladoc/api/typereference.vala |    4 ++++
 8 files changed, 54 insertions(+), 0 deletions(-)
---
diff --git a/src/libvaladoc/api/class.vala b/src/libvaladoc/api/class.vala
index 5cd03a0..7ee2c6a 100644
--- a/src/libvaladoc/api/class.vala
+++ b/src/libvaladoc/api/class.vala
@@ -73,6 +73,10 @@ public class Valadoc.Api.Class : TypeSymbol {
 		return this.vclass.get_take_value_function ();
 	}
 
+	public string? get_dbus_name () {
+		return Vala.DBusModule.get_dbus_name ((Vala.TypeSymbol) symbol);
+	}
+
 	public Collection<TypeReference> get_implemented_interface_list () {
 		return this.interfaces;
 	}
diff --git a/src/libvaladoc/api/errorcode.vala b/src/libvaladoc/api/errorcode.vala
index f6a4a79..ded2078 100644
--- a/src/libvaladoc/api/errorcode.vala
+++ b/src/libvaladoc/api/errorcode.vala
@@ -56,6 +56,10 @@ public class Valadoc.Api.ErrorCode : TypeSymbol {
 		return ((Vala.ErrorCode) symbol).get_cname ();
 	}
 
+	public string get_dbus_name () {
+		return Vala.DBusModule.get_dbus_name_for_member (symbol);
+	}
+
 	public override NodeType node_type { get { return NodeType.ERROR_CODE; } }
 
 	public override void accept (Visitor visitor) {
diff --git a/src/libvaladoc/api/errordomain.vala b/src/libvaladoc/api/errordomain.vala
index ddb8564..03d956a 100644
--- a/src/libvaladoc/api/errordomain.vala
+++ b/src/libvaladoc/api/errordomain.vala
@@ -33,6 +33,10 @@ public class Valadoc.Api.ErrorDomain : TypeSymbol {
 		return ((Vala.ErrorDomain) symbol).get_cname();
 	}
 
+	public string? get_dbus_name () {
+		return Vala.DBusModule.get_dbus_name ((Vala.TypeSymbol) symbol);
+	}
+
 	public override NodeType node_type { get { return NodeType.ERROR_DOMAIN; } }
 
 	public override void accept (Visitor visitor) {
diff --git a/src/libvaladoc/api/interface.vala b/src/libvaladoc/api/interface.vala
index c6b68af..d317729 100644
--- a/src/libvaladoc/api/interface.vala
+++ b/src/libvaladoc/api/interface.vala
@@ -54,6 +54,10 @@ public class Valadoc.Api.Interface : TypeSymbol {
 		return ((Vala.Interface) symbol).get_cname ();
 	}
 
+	public string? get_dbus_name () {
+		return Vala.DBusModule.get_dbus_name ((Vala.TypeSymbol) symbol);
+	}
+
 	public TypeReference? base_type { private set; get; }
 
 	public override NodeType node_type { get { return NodeType.INTERFACE; } }
diff --git a/src/libvaladoc/api/method.vala b/src/libvaladoc/api/method.vala
index 96087b8..91de383 100644
--- a/src/libvaladoc/api/method.vala
+++ b/src/libvaladoc/api/method.vala
@@ -37,6 +37,14 @@ public class Valadoc.Api.Method : Member {
 		return ((Vala.Method) symbol).get_finish_cname ();
 	}
 
+	public string get_dbus_name () {
+		return Vala.DBusModule.get_dbus_name_for_member (symbol);
+	}
+
+	public string get_dbus_result_name () {
+		return Vala.DBusServerModule.dbus_result_name ((Vala.Method) symbol);
+	}
+
 	public Method? base_method { private set; get; }
 
 	public TypeReference? return_type { private set; get; }
@@ -86,6 +94,12 @@ public class Valadoc.Api.Method : Member {
 		}
 	}
 
+	public bool is_dbus_visible {
+		get {
+			return Vala.DBusServerModule.is_dbus_visible (symbol);
+		}
+	}
+
 	public override string? name {
 		owned get {
 			if (this.is_constructor) {
diff --git a/src/libvaladoc/api/property.vala b/src/libvaladoc/api/property.vala
index af7e25b..b702ee5 100644
--- a/src/libvaladoc/api/property.vala
+++ b/src/libvaladoc/api/property.vala
@@ -42,6 +42,10 @@ public class Valadoc.Api.Property : Member {
 		return ((Vala.Property) symbol).nick;
 	}
 
+	public string get_dbus_name () {
+		return Vala.DBusModule.get_dbus_name_for_member (symbol);
+	}
+
 	public TypeReference? property_type { private set; get;}
 
 	public bool is_virtual {
@@ -62,6 +66,12 @@ public class Valadoc.Api.Property : Member {
 		}
 	}
 
+	public bool is_dbus_visible {
+		get {
+			return Vala.DBusServerModule.is_dbus_visible (symbol);
+		}
+	}
+
 	public PropertyAccessor setter { private set; get; }
 
 	public PropertyAccessor getter { private set; get; }
diff --git a/src/libvaladoc/api/signal.vala b/src/libvaladoc/api/signal.vala
index 30b5a36..ffecf94 100644
--- a/src/libvaladoc/api/signal.vala
+++ b/src/libvaladoc/api/signal.vala
@@ -33,6 +33,10 @@ public class Valadoc.Api.Signal : Member {
 		return ((Vala.Signal) symbol).get_cname();
 	}
 
+	public string get_dbus_name () {
+		return Vala.DBusModule.get_dbus_name_for_member (symbol);
+	}
+
 	public TypeReference? return_type { protected set; get; }
 
 	internal override void resolve_type_references (Tree root) {
@@ -47,6 +51,12 @@ public class Valadoc.Api.Signal : Member {
 		}
 	}
 
+	public bool is_dbus_visible {
+		get {
+			return Vala.DBusServerModule.is_dbus_visible (symbol);
+		}
+	}
+
 	protected override Inline build_signature () {
 		var signature = new SignatureBuilder ();
 
diff --git a/src/libvaladoc/api/typereference.vala b/src/libvaladoc/api/typereference.vala
index 64b5ac6..e62071c 100644
--- a/src/libvaladoc/api/typereference.vala
+++ b/src/libvaladoc/api/typereference.vala
@@ -174,6 +174,10 @@ public class Valadoc.Api.TypeReference : Item {
 		}
 	}
 
+	public string? get_dbus_type_signature () {
+		return Vala.DBusModule.get_type_signature (vtyperef);
+	}
+
 	internal override void resolve_type_references (Tree root) {
 		if ( this.vtyperef is Vala.PointerType) {
 			this.data_type = new Pointer ((Vala.PointerType) this.vtyperef, this);



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