summaryrefslogtreecommitdiffstats
path: root/AirPlayService.py
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2011-04-07 15:15:57 +0200
committerGravatar Martin Szulecki2011-04-07 15:15:57 +0200
commit000c99126db23bbe5467c2f5f7fcfaf05b343d82 (patch)
treebcf84c7b0659f7ad574357ee11e00577a8185542 /AirPlayService.py
parent9d466e4852da547d2da83486c051af61eecd12ad (diff)
downloadtotem-plugin-airplay-000c99126db23bbe5467c2f5f7fcfaf05b343d82.tar.gz
totem-plugin-airplay-000c99126db23bbe5467c2f5f7fcfaf05b343d82.tar.bz2
Implement server-info request of iOS 4.3
Diffstat (limited to 'AirPlayService.py')
-rw-r--r--AirPlayService.py20
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):
119 elif (request.type == 'PUT' and request.uri.find('/photo')>-1): 119 elif (request.type == 'PUT' and request.uri.find('/photo')>-1):
120 self.photo(request.body, request.headers['X-Apple-Transition']) 120 self.photo(request.body, request.headers['X-Apple-Transition'])
121 answer = self.create_request() 121 answer = self.create_request()
122 elif (request.type == 'GET' and request.uri.find('/server-info')>-1):
123 self.server_info()
124 content = '<?xml version="1.0" encoding="UTF-8"?>\
125<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\
126<plist version="1.0">\
127<dict>\
128<key>deviceid</key>\
129<string>%s</string>\
130<key>features</key>\
131<integer>%d</integer>\
132<key>model</key>\
133<string>%s</string>\
134<key>protovers</key>\
135<string>1.0</string>\
136<key>srcvers</key>\
137<string>101.10</string>\
138</dict>\
139</plist>'
140 content = content % (self.service.deviceid, self.service.features, self.service.model)
141 answer = self.create_request(200, "Content-Type: text/x-apple-plist+xml", content)
122 else: 142 else:
123 print "ERROR: AirPlay - Unable to handle request \"%s\"" % (request.uri) 143 print "ERROR: AirPlay - Unable to handle request \"%s\"" % (request.uri)
124 answer = self.create_request(404) 144 answer = self.create_request(404)