Package elisa :: Package core :: Module application :: Class Application
[hide private]
[frames] | no frames]

Class Application

source code


Application is the entry point of Elisa. It groups all the necessary elements needed for Elisa to run. It is in charge of instantiating a Config and a PluginRegistry. Application also provides access to input events and data, and holds the user interfaces. It creates various managers (InputManager, MediaManager...), an InterfaceController and a DBBackend.

Nested Classes [hide private]
  __metaclass__
Instance Methods [hide private]
 
__classinit__(cls, new_attrs)
Given a class and a new set of attributes (as passed in by __classinit__), create or modify properties based on functions with special names ending in __get, __set, and __del.
source code
 
__init__(self, config_filename=None, show_tracebacks=False)
Application constructor.
source code
 
_compile_po_files(self) source code
 
_load_translator(self) source code
 
_load_config(self, config_filename) source code
 
_load_profiler(self)
This imports profiling modules (TODO)
source code
 
_check_updates(self) source code
 
_load_exception_hook(self)
Override the default system exception hook with our own
source code
 
handle_traceback(self)
Call this to force the exception hook to handle the exception on top of the stack.
source code
 
plugin_registry__get(self) source code
 
bus__get(self) source code
 
translator__get(self) source code
 
metadata_manager__get(self) source code
 
mime_getter__get(self) source code
 
service_manager__get(self) source code
 
player_registry__get(self) source code
 
interface_controller__get(self) source code
 
input_manager__get(self) source code
 
media_manager__get(self) source code
 
thumbnailer__get(self) source code
 
config__get(self) source code
 
initialize(self) source code
 
start(self)
Execute the application.
source code
 
restart(self) source code
twisted.internet.defer.Deferred
stop(self, stop_reactor=True)
Stop the application.
source code

Inherited from extern.log.log.Loggable: debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  log_category = "application"

Inherited from extern.log.log.Loggable: logCategory

Instance Variables [hide private]
elisa.core.bus.bus.Bus bus
DOCME
elisa.core.config.Config config
Application's configuration file, storing options
elisa.core.input_manager.InputManager input_manager
DOCME
elisa.core.interface_controller.InterfaceController interface_controller
DOCME
elisa.core.media_manager.MediaManager media_manager
DOCME
elisa.core.metadata_manager.MetadataManager metadata_manager
DOCME
elisa.core.utils.mime_getter.MimeGetter mime_getter
DOCME
elisa.core.player_registry.PlayerRegistry player_registry
DOCME
elisa.core.plugin_registry.PluginRegistry plugin_registry
loads and manages the plugins
elisa.core.service_manager.ServiceManager service_manager
DOCME
elisa.core.thumbnailer.Thumbnailer thumbnailer
DOCME
elisa.extern.translator.Translator translator
DOCME
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, config_filename=None, show_tracebacks=False)
(Constructor)

source code 
Application constructor. It:
  • loads global localization
  • loads the config file
  • loads the profiler
Parameters:
  • config_filename (string or None to use default config file) - the config filename to use. Can be absolute or relative path
Overrides: log.Loggable.__init__

handle_traceback(self)

source code 
Call this to force the exception hook to handle the exception on top of the stack. This can be handy to use from and except: block.

start(self)

source code 
Execute the application. Start the Managers and the InterfaceController.

stop(self, stop_reactor=True)

source code 
Stop the application.
Parameters:
  • stop_reactor (bool) - stop the reactor after stopping the application
Returns: twisted.internet.defer.Deferred