diff options
author | Martin Szulecki | 2011-04-07 15:15:57 +0200 |
---|---|---|
committer | Martin Szulecki | 2011-04-07 15:15:57 +0200 |
commit | 000c99126db23bbe5467c2f5f7fcfaf05b343d82 (patch) | |
tree | bcf84c7b0659f7ad574357ee11e00577a8185542 | |
parent | 9d466e4852da547d2da83486c051af61eecd12ad (diff) | |
download | totem-plugin-airplay-000c99126db23bbe5467c2f5f7fcfaf05b343d82.tar.gz totem-plugin-airplay-000c99126db23bbe5467c2f5f7fcfaf05b343d82.tar.bz2 |
Implement server-info request of iOS 4.3
-rw-r--r-- | AirPlayService.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/AirPlayService.py b/AirPlayService.py index 5525712..be3eeb0 100644 --- a/AirPlayService.py +++ b/AirPlayService.py @@ -119,6 +119,26 @@ class AirPlayProtocolHandler(asyncore.dispatcher_with_send): elif (request.type == 'PUT' and request.uri.find('/photo')>-1): self.photo(request.body, request.headers['X-Apple-Transition']) answer = self.create_request() + elif (request.type == 'GET' and request.uri.find('/server-info')>-1): + self.server_info() + content = '<?xml version="1.0" encoding="UTF-8"?>\ +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\ +<plist version="1.0">\ +<dict>\ +<key>deviceid</key>\ +<string>%s</string>\ +<key>features</key>\ +<integer>%d</integer>\ +<key>model</key>\ +<string>%s</string>\ +<key>protovers</key>\ +<string>1.0</string>\ +<key>srcvers</key>\ +<string>101.10</string>\ +</dict>\ +</plist>' + content = content % (self.service.deviceid, self.service.features, self.service.model) + answer = self.create_request(200, "Content-Type: text/x-apple-plist+xml", content) else: print "ERROR: AirPlay - Unable to handle request \"%s\"" % (request.uri) answer = self.create_request(404) |