示例#1
0
def handler_test_cp_plugin_handler(widget, plug, app):
    global count

    try:
        plugin = plugins.pop()
    except:
        return

    print "executing:", plugin
    plug.plugin_execute(plugin, True, app)
    print "saving..."
    plug.plugin_save_state(plugin)

c = osso.Context("test_client", "0.0.0", False)
as = osso.Autosave(c)
applic = osso.Application(c)
rpc = osso.Rpc(c)
print "as.get_name() ->", as.get_name()
print "as.get_version() ->", as.get_version()
print "rpc.get_rpc_timeout() ->", rpc.get_rpc_timeout()
print "rpc.set_rpc_timeout(15) ->", rpc.set_rpc_timeout(15)
print "rpc.get_rpc_timeout() ->", rpc.get_rpc_timeout()
timenot = osso.TimeNotification(c)
timenot.set_time_notification_callback(handler_test_time_notification, "Notification Callback!")
timenot.set_time(time.localtime())
plug = osso.Plugin(c)
ss = osso.StateSaving(c)

local = osso.Locale(c)

# Interface
示例#2
0
 def test_constructor(self):
     app = osso.Application(self.ctx)
     self.assertTrue(isinstance(app, osso.Application))
     self.assertRaises(TypeError, osso.Application, None)
示例#3
0
def send_rpc(widget, osso_c):
    osso_app = osso.Application(osso_c)
    osso_app.application_top("spam.eggs.osso_test_app", None)
    print "RPC sent"
示例#4
0
 def test_application_top(self):
     app = osso.Application(self.ctx)
     app.application_top("browse")