Home | Trees | Index | Help |
|
---|
Package AccessGrid :: Module AppDb :: Class AppDb |
|
The AppDb class provides an interface for the Toolkit to store information on a per user basis about what applications are installed and how to run them.
Method Summary | |
---|---|
The constructor for the AppDb, it uses a file for persistent storage. | |
returns a tuple (int, string). | |
returns a tuple of (int, string). | |
returns a string containing the commandline used to execute the viewer, optionally if vars is a dictionary, of name = value, named parameter substitution is done for the command line. | |
returns a list of command names for this mime type. | |
returns a dict of [commandname:command] for this mimetype | |
returns a extension in a string. | |
Find a mimetype for the specified app name or extension. | |
returns a name in a string. | |
ListApplications(self)
| |
ListAppsAsAppDescriptions(self)
| |
ListMimeTypes(self)
| |
Load the app db from the file it's stored in. | |
Encapsulate all the actions required to register a new application. | |
returns a tuple (int, string). | |
returns a tuple of (int, string). | |
Encapsulate all the actions required to unregister an application. | |
Flush the current db out to file storage. | |
Get a user friendly name for a private name. | |
Get a user friendly name for a private verb. | |
Look up the private name for the exposed name. | |
Look up the private verb for the exposed verb. | |
Synch the in-memory app db with the file, if necessary | |
Update the last modified time of the appdb file |
Class Variable Summary | |
---|---|
str |
defaultSeparator = ':'
|
Method Details |
---|
__init__(self,
path=None,
filename='ApplicationDatabase')
|
AddCommand(self, mimeType, cmdName, cmdString)returns a tuple (int, string). Success is (1, cmdName), failure is (0, reason). |
AddMimeType(self, name, extension, mimeType, startable='1')returns a tuple of (int, string). Success is (1, mimeType), failure is (0, reason) |
GetCommandLine(self, mimeType, cmdName, vars=None)returns a string containing the commandline used to execute the viewer, optionally if vars is a dictionary, of name = value, named parameter substitution is done for the command line. |
GetCommandNames(self, mimeType)returns a list of command names for this mime type. |
GetCommands(self, mimeType)returns a dict of [commandname:command] for this mimetype |
GetExtForMimeType(self, mimeType)returns a extension in a string. |
GetMimeType(self, name=None, extension=None)Find a mimetype for the specified app name or extension. returns a mimeType in a string. |
GetNameForMimeType(self, mimeType)returns a name in a string. |
Load(self, fileName=None)Load the app db from the file it's stored in. |
RegisterApplication(self, name, mimeType, extension, commandDict, fileList, srcPath, dstPath, startable='1')Encapsulate all the actions required to register a new application. returns 0 on failure, 1 on success |
RemoveCommand(self, mimeType, cmdName)returns a tuple (int, string). Success is (1, cmdName), failure is (0, reason). |
RemoveMimeType(self, name=None, extension=None, mimeType=None)returns a tuple of (int, string). Success is (1, mimeType), failure is (0, reason) |
UnregisterApplication(self, name=None, mimeType=None, extension=None)Encapsulate all the actions required to unregister an application. returns 0 on failure, 1 on success |
_Flush(self)Flush the current db out to file storage. |
_GetNiceName(self, pName)Get a user friendly name for a private name. |
_GetNiceVerb(self, pVerb)Get a user friendly name for a private verb. |
_GetPrivName(self, name)Look up the private name for the exposed name. returns name as string or None |
_GetPrivVerb(self, verb, mimeType)Look up the private verb for the exposed verb. |
_Synch(self)Synch the in-memory app db with the file, if necessary |
_UpdateModTime(self)Update the last modified time of the appdb file |
Class Variable Details |
---|
defaultSeparator
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Thu Apr 14 16:39:27 2005 | http://epydoc.sf.net |