lib¶
-
class
openlp.plugins.remotes.lib.
RemoteTab
(parent, title, visible_title, icon_path)[source]¶ Bases:
openlp.core.lib.settingstab.SettingsTab
RemoteTab is the Remotes settings tab in the settings dialog.
-
class
openlp.plugins.remotes.lib.
OpenLPServer
[source]¶ Bases:
openlp.core.common.registryproperties.RegistryProperties
-
class
openlp.plugins.remotes.lib.
HttpRouter
[source]¶ Bases:
openlp.core.common.registryproperties.RegistryProperties
This code is called by the HttpServer upon a request and it processes it based on the routing table. This code is stateless and is created on each request. Some variables may look incorrect but this extends BaseHTTPRequestHandler.
-
add_to_service
(plugin_name)[source]¶ Add item of type
plugin_name
to the end of the service.Parameters: plugin_name – name of plugin to be called
-
call_function
(function, *args)[source]¶ Invoke the route function passing the relevant values
Parameters: - function – The function to be called.
- args – Any passed data.
-
controller
(display_type, action)[source]¶ Perform an action on the slide controller.
Parameters: - display_type – This is the type of slide controller, either
preview
orlive
. - action – The action to perform.
- display_type – This is the type of slide controller, either
-
controller_text
(var)[source]¶ Perform an action on the slide controller.
Parameters: var – variable - not used
-
display
(action)[source]¶ Hide or show the display screen. This is a cross Thread call and UI is updated so Events need to be used.
Parameters: action – This is the action, either hide
orshow
.
Create a needs authorisation http header.
-
get_content_type
(file_name)[source]¶ Examines the extension of the file and determines what the content_type should be, defaults to text/plain Returns the extension and the content_type
Parameters: file_name – name of file
-
go_live
(plugin_name)[source]¶ Go live on an item of type
plugin
.Parameters: plugin_name – name of plugin
-
plugin_info
(action)[source]¶ Return plugin related information, based on the action.
Parameters: action – The action to perform. If search return a list of plugin names which support search.
-
process_http_request
(url_path, *args)[source]¶ Common function to process HTTP requests
Parameters: - url_path – The requested URL.
- args – Any passed data.
-
search
(plugin_name)[source]¶ Return a list of items that match the search text.
Parameters: plugin_name – The plugin name to search in.
-
serve_file
(file_name=None)[source]¶ Send a file to the socket. For now, just a subset of file types and must be top level inside the html folder. If subfolders requested return 404, easier for security for the present.
Ultimately for i18n, this could first look for xx/file.html before falling back to file.html. where xx is the language, e.g. ‘en’
-
serve_thumbnail
(controller_name=None, dimensions=None, file_name=None)[source]¶ Serve an image file. If not found return 404.
Parameters: - file_name – file name to be served
- dimensions – image size
- controller_name – controller to be called
-
service
(action)[source]¶ Handles requests for service items in the service manager
Parameters: action – The action to perform.
-