Ejemplo n.º 1
0
    def startService(self):
        log.msg("Airpnp started. Will now search for UPnP devices!")

        if self.iweb:
            # apparently, logging in __init__ is too early
            iwebport = self.iweb.port
            log.msg("Starting interactive web at port %d" % (iwebport, ))
        DeviceDiscoveryService.startService(self)
Ejemplo n.º 2
0
    def __init__(self, interface):
        DeviceDiscoveryService.__init__(self, interface[0], MEDIA_RENDERER_TYPES,
                                        [MEDIA_RENDERER_DEVICE_TYPE],
                                        REQ_SERVICE_TYPES)

        self._ports = []
        
        # optionally add a server for the Interactive Web
        if config.interactive_web_enabled():
            iwebport = config.interactive_web_port()
            self.iweb = InteractiveWeb(iwebport, interface[0])
            self.iweb.setServiceParent(self)
        else:
            self.iweb = None

        # add a server for serving photos to UPnP devices
        self.photoweb = PhotoWeb(0, 5, interface[0])
        self.photoweb.setServiceParent(self)

        self.interface = interface