From 01c68def34bc8b1d2a2b5ac0a21c6eb4a13e04e3 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 12 May 2002 09:24:45 +0200 Subject: Changed the cPlugin::Start() function to return a boolean value --- PLUGINS.html | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'PLUGINS.html') diff --git a/PLUGINS.html b/PLUGINS.html index bbe1a1de..b2af135b 100644 --- a/PLUGINS.html +++ b/PLUGINS.html @@ -16,9 +16,12 @@ This document describes the "outside" interface of the plugin system. It handles everything necessary for a plugin to get hooked into the core VDR program and present itself to the user.

-
  +
  Important modifications introduced in version 1.1.1 are marked like this.
+
  +Important modifications introduced in version 1.1.2 are marked like this. +

Quick start

@@ -184,7 +187,7 @@ its memory. You don't need to worry about the details behind all this. If your plugin requires additional source files, simply add them to your plugin's source directory and adjust the Makefile accordingly.

-
  +
  Header files usually contain preprocessor statements that prevent the same file (or rather its contents, to be precise) from being included more than once, like @@ -403,9 +406,11 @@ If a plugin implements a function that runs in the background (presumably in a thread of its own), or wants to make use of internationalization, it needs to implement the function +
 


-virtual void Start(void); +virtual bool Start(void);

+

which is called once for each plugin at program startup. Inside this function the plugin must set up everything necessary to perform @@ -413,6 +418,13 @@ its task. This may, for instance, be a thread that collects data from the DVB stream, which is later presented to the user via a function that is available from the main menu.

+
  +A return value of false indicates that something has gone wrong and the +plugin will not be able to perform its task. In that case, the plugin should +write a proper error message to the log file. The first plugin that returns +false from its Start() function will cause VDR to exit. +
+

If the plugin doesn't implement any background functionality or internationalized texts, it doesn't need to implement this function. @@ -490,7 +502,7 @@ previously stored in the global setup data (see below). It shall return true if the parameter was parsed correctly, false in case of an error. If false is returned, an error message will be written to the log file (and program execution will continue). -
  +
  A possible implementation of SetupParse() could look like this:


@@ -545,7 +557,7 @@ needs setup parameters that are not directly user adjustable. It can use SetupStore() and SetupParse() without presenting these parameters to the user. -
  +
 

The Setup menu

Have it your way!

-- cgit v1.2.3