A Python UPnP Media Server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.1 KiB

  1. # Licensed under the MIT license
  2. # http://opensource.org/licenses/mit-license.php
  3. # Copyright 2005, Tim Potter <tpot@samba.org>
  4. # Connection Manager service
  5. from twisted.python import log
  6. from twisted.web import resource, static, soap
  7. from upnp import UPnPPublisher
  8. class ConnectionManagerControl(UPnPPublisher):
  9. def soap_GetProtocolInfo(self, *args, **kwargs):
  10. log.msg('GetProtocolInfo(%s, %s)' % (`args`, `kwargs`))
  11. def soap_PrepareForConnection(self, *args, **kwargs):
  12. log.msg('PrepareForConnection(%s, %s)' % (`args`, `kwargs`))
  13. def soap_ConnectionComplete(self, *args, **kwargs):
  14. log.msg('ConnectionComplete(%s, %s)' % (`args`, `kwargs`))
  15. def soap_GetCurrentConnectionIDs(self, *args, **kwargs):
  16. log.msg('GetCurrentConnectionIDs(%s, %s)' % (`args`, `kwargs`))
  17. def soap_GetCurrentConnectionInfo(self, *args, **kwargs):
  18. log.msg('GetProtocolInfo(%s, %s)' % (`args`, `kwargs`))
  19. class ConnectionManagerServer(resource.Resource):
  20. def __init__(self):
  21. resource.Resource.__init__(self)
  22. self.putChild('scpd.xml', static.File('connection-manager-scpd.xml'))
  23. self.putChild('control', ConnectionManagerControl())