1 # Written by Ingar Arntzen, Norut
2 # see LICENSE.txt for license information
4 """This module implements a URL UPnP Service."""
7 from BaseLib.UPnP.upnpserver import UPnPService
9 DEFAULT_URL = "http://vg.no"
12 ##############################################
14 ##############################################
16 class URLService(UPnPService):
18 """This class implements a simple URL service."""
20 def __init__(self, service_id):
21 UPnPService.__init__(self, service_id, 'URLService',
24 # Define Evented Variable
25 self._url = self.define_evented_variable("URL", types.StringType,
29 self.define_action(self.get_url,
30 out_args=[("URL", types.StringType)],
32 self.define_action(self.set_url,
33 in_args=[("URL", types.StringType)],
38 return self._url.get()
40 def set_url(self, new_url):
42 self._url.set(new_url)