示例#1
0
class AppNamespace(BaseNamespace, BroadcastMixin, RoomsMixin):
    """
        docstring for AppNamespace
    """
        
    def __app_info(data):
        app_name = data['app_name']
        app_id = data['app_id']


    def recv_connect(self):
        print 'AppNamespace: recv_connect'

    def initialize(self):
        print 'AppNamespace: initialize'
        self.list_of_apps = []
        self.ubiq_app = UbiqVideo()
        self.list_of_apps.append(self.ubiq_app)
        #list of accepted apps?

    def on_app_info(data):
        print 'AppNamespace: Application Info'

    def on_register_app(self, data):
        app_name = data['app_name']
        app_id = data['app_id']
        app_description = data['app_description']


    def on_connect_app(self, data):
        print 'AppNamespace: on_connect_app'


    def on_app_start(self, data):
        print 'AppNamespace: on_start_app'
        #check app credentials

        params = data['params']
        self.ubiq_app.start(params, self)

    def on_app_action(self, data):
        #print 'AppNamespace: on_update_app'
        #check app credentials
        #Get App id and figure out the app

        params = data['params']
        self.ubiq_app.action(params)

    def on_app_stop(self, data):
        print 'AppNamespace: on_stop_app'

        params = data['params']
        self.ubiq_app.stop(params)
示例#2
0
 def initialize(self):
     print 'AppNamespace: initialize'
     self.list_of_apps = []
     self.ubiq_app = UbiqVideo()
     self.list_of_apps.append(self.ubiq_app)