]> git.meshlink.io Git - catta/commitdiff
update python stuff a little to match the newest DBUS interfaces
authorLennart Poettering <lennart@poettering.net>
Tue, 15 Nov 2005 01:23:51 +0000 (01:23 +0000)
committerLennart Poettering <lennart@poettering.net>
Tue, 15 Nov 2005 01:23:51 +0000 (01:23 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@974 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-python/avahi-bookmarks.in
avahi-python/avahi/__init__.py

index 2de9186f535d271024e614fba8c2dfb6bc261944..74037bbc2298adf4a83dd002f3420a75ac801bef 100755 (executable)
@@ -62,10 +62,8 @@ class AvahiBookmarks(resource.Resource):
         self.version_string = self.server.GetVersionString()
 
         self.browse_service_type("_http._tcp")
-
-        # Hurrah! if I enable one of the following lines, python segfaults.
-        #self.browse_service_type("_https._tcp")
-        #self.browse_service_type("_ftp._tcp")
+        self.browse_service_type("_https._tcp")
+        self.browse_service_type("_ftp._tcp")
 
     def browse_service_type(self, stype):
 
index c10b85d404c6f8903cba1409ff416520179e6ff1..c91692e418f1bda9babf9c197cce72b126e612b7 100644 (file)
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 # USA.
 
-# Some definitions matching those in core.h
-import socket, dbus
+# Some definitions matching those in avahi-common/defs.h
 
-SERVER_INVALID, SERVER_REGISTERING, SERVER_RUNNING, SERVER_COLLISION = range(0, 4)
+import dbus
 
-ENTRY_GROUP_UNCOMMITED, ENTRY_GROUP_REGISTERING, ENTRY_GROUP_ESTABLISHED, ENTRY_GROUP_COLLISION = range(0, 4)
+SERVER_INVALID, SERVER_REGISTERING, SERVER_RUNNING, SERVER_COLLISION, SERVER_FAILURE = range(0, 5)
 
-DOMAIN_BROWSER_REGISTER, DOMAIN_BROWSER_REGISTER_DEFAULT, DOMAIN_BROWSER_BROWSE, DOMAIN_BROWSER_BROWSE_DEFAULT, DOMAIN_BROWSER_BROWSE_LEGACY = range(0, 5)
+ENTRY_GROUP_UNCOMMITED, ENTRY_GROUP_REGISTERING, ENTRY_GROUP_ESTABLISHED, ENTRY_GROUP_COLLISION, ENTRY_GROUP_FAILURE = range(0, 5)
+
+DOMAIN_BROWSER_BROWSE, DOMAIN_BROWSER_BROWSE_DEFAULT, DOMAIN_BROWSER_REGISTER, DOMAIN_BROWSER_REGISTER_DEFAULT, DOMAIN_BROWSER_BROWSE_LEGACY = range(0, 5)
 
 PROTO_UNSPEC, PROTO_INET, PROTO_INET6  = -1, 0, 1
 
 IF_UNSPEC = -1
 
+PUBLISH_UNIQUE = 1
+PUBLISH_NO_PROBE = 2
+PUBLISH_NO_ANNOUNCE = 4
+PUBLISH_ALLOW_MULTIPLE = 8
+PUBLISH_NO_REVERSE = 16
+PUBLISH_NO_COOKIE = 32
+PUBLISH_UPDATE = 64
+PUBLISH_USE_WIDE_AREA = 128
+PUBLISH_USE_MULTICAST = 256
+
+LOOKUP_USE_WIDE_AREA = 1
+LOOKUP_USE_MULTICAST = 2
+LOOKUP_NO_TXT = 4
+LOOKUP_NO_ADDRESS = 8
+
+LOOKUP_RESULT_CACHED = 1
+LOOKUP_RESULT_WIDE_AREA = 2
+LOOKUP_RESULT_MULTICAST = 4
+LOOKUP_RESULT_LOCAL = 8
+LOOKUP_RESULT_OUR_OWN = 16
+LOOKUP_RESULT_STATIC = 32
+
+SERVICE_COOKIE = "org.freedesktop.Avahi.cookie"
+SERVICE_COOKIE_INVALID = 0
+
 DBUS_NAME = "org.freedesktop.Avahi"
 DBUS_INTERFACE_SERVER = DBUS_NAME + ".Server"
 DBUS_PATH_SERVER = "/"
@@ -37,6 +63,9 @@ DBUS_INTERFACE_ENTRY_GROUP = DBUS_NAME + ".EntryGroup"
 DBUS_INTERFACE_DOMAIN_BROWSER = DBUS_NAME + ".DomainBrowser"
 DBUS_INTERFACE_SERVICE_TYPE_BROWSER = DBUS_NAME + ".ServiceTypeBrowser"
 DBUS_INTERFACE_SERVICE_BROWSER = DBUS_NAME + ".ServiceBrowser"
+DBUS_INTERFACE_ADDRESS_RESOLVER = DBUS_NAME + ".AddressResolver"
+DBUS_INTERFACE_HOST_NAME_RESOLVER = DBUS_NAME + ".HostNameResolver"
+DBUS_INTERFACE_SERVICE_RESOLVER = DBUS_NAME + ".ServiceResolver"
 
 def byte_array_to_string(s):
     r = ""