[vala/0.10] avahi-gobject: Make Avahi.Protocol an enum instead of struct.



commit f65ea5cdf23174c10e555312b425e134ff035d8e
Author: Daniel Svensson <dsvensson gmail com>
Date:   Thu Jan 6 17:07:29 2011 +0100

    avahi-gobject: Make Avahi.Protocol an enum instead of struct.

 vapi/avahi-gobject.vapi |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)
---
diff --git a/vapi/avahi-gobject.vapi b/vapi/avahi-gobject.vapi
index 9703e50..ef9474e 100644
--- a/vapi/avahi-gobject.vapi
+++ b/vapi/avahi-gobject.vapi
@@ -97,20 +97,18 @@ namespace Avahi {
 	/* Network addresses */
 
 	[SimpleType]
-	[CCode(cheader_filename="avahi-common/address.h", cname="AvahiProtocol", cprefix="avahi_proto_")]
-	public struct Protocol {
-		[CCode(cname="AVAHI_PROTO_INET")]
-		public static Protocol INET;
-		[CCode(cname="AVAHI_PROTO_INET6")]
-		public static Protocol INET6;
-		[CCode(cname="AVAHI_PROTO_UNSPEC")]
-		public static Protocol UNSPEC;
+	[CCode(cheader_filename="avahi-common/address.h", cname="AvahiProtocol", cprefix="AVAHI_PROTO_", lower_case_cprefix="avahi_proto_")]
+	public enum Protocol {
+		INET,
+		INET6,
+		UNSPEC;
 
 		[CCode(cname="avahi_af_to_proto")]
-		public Protocol.from_af(int af);
+		public static Protocol from_af(int af);
 
 		public unowned string to_string();
 		public int to_af();
+
 		[CCode(cname="AVAHI_PROTO_VALID")]
 		public bool is_valid();
 	}



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