App Class

From DevWiki

Jump to: navigation, search

Back to API Reference


Contents


App

Main class for working with an application. Includes launching of applications, accessing the application configuration parameters storage, etc.
Get the object by calling GetApp() function.

app = mc.GetApp()


ActivateWindow

void ActivateWindow(int windowId, parameters Parameters)
Activate a window of the application with parameters.
params = mc.Parameters()
params["title"] = "Foo"
app.ActivateWindow(14001, params)


GetAppDir

string GetAppDir(void)
Returns the full path where the application is installed.
appInstallPath = app.GetAppDir()


GetAppMediaDir

string GetAppMediaDir(void)
Returns the full path where the media files of the application are stored.
mediaDir = app.GetAppMediaDir()


GetAppSkinDir

string GetAppSkinDir(void)
Returns the full path where the skin files of the application are stored.
skinDir = app.GetAppSkinDir()


GetAuthenticationToken

string GetAuthenticationToken(void)
Returns an authentication token for the application. For boxee internal use.
authToken = app.GetAuthenticationToken()


GetId

string GetId(void)
Returns the id of the currently running application.
appID = app.GetId()


GetLaunchedListItem

listitem GetLaunchedListItem(void)
Returns the list item that the application was launched with. this is mainly useful to get an item from the history/recommendation/rating.
item = app.GetLaunchedListItem()


GetLaunchedScriptParameters

parameters GetLaunchedScriptParameters(void)
Returns the parameters of the executed script using RunScript. You can also access those parameters with sys.arv[1].
params = app.GetLaunchedScriptParameters()


GetLaunchedWindowParameters

parameters GetLaunchedWindowParameters(void)
Returns the parameters of the activated application window using ActivateWindow.
params = app.GetLaunchedWindowParameters()


GetLocalConfig

localconfig GetLocalConfig(void)
Returns the local configuration storage for an application.
config = GetLocalConfig()


RunScript

void RunScript(string scriptName, parameters Parameters)
Run a python script of an application.
params = mc.Parameters()
app.RunScript('myscript', params)
Personal tools