diff --git a/PLUGINS.html b/PLUGINS.html index b632b61d..9a97b000 100644 --- a/PLUGINS.html +++ b/PLUGINS.html @@ -20,19 +20,6 @@ The external interface handles everything necessary for a plugin to get h VDR program and present itself to the user. The internal interface provides the plugin code access to VDR's internal data structures and allows it to hook itself into specific areas to perform special actions. -

-
  -Important modifications introduced in version 1.1.17 are marked like this. -
-
  -Important modifications introduced in version 1.1.27 are marked like this. -
-
  -Important modifications introduced in version 1.1.31 are marked like this. -
-
  -Important modifications introduced in version 1.1.32 are marked like this. -


Table Of Contents

@@ -284,10 +271,8 @@ The constructor shall initialize any member variables the plugin defines, must not access any global structures of VDR. It also must not create any threads or other large data structures. These things are done in the -
  Initialize() or Start() -
function later. Constructing a plugin object shall not have any side effects or produce any output, since VDR, for instance, has to create the plugin objects in order to get their @@ -460,26 +445,20 @@ thread of its own), or wants to make use of inte it needs to implement one of the functions


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

which are called once for each plugin at program startup. -
  -
  The difference between these two functions is that Initialize() is called early at program startup, while Start() is called after the primary device and user interface has been set up, but before the main program loop is entered. -
Inside the Start() function of any plugin it is guaranteed that the Initialize() functions of all plugins have already been called. For many plugins it probably doesn't matter which of these functions they implement, but it may be of importance for, e.g., plugins that implement devices. Such plugins should create their cDevice derived objects in Initialize(), so that other plugins can use them in their Start() functions. -

Inside this function the plugin must set up everything necessary to perform its task. This may, for instance, be a thread that collects data from the DVB @@ -529,7 +508,6 @@ in the call to VDR. If the user selects the main menu entry of a plugin, VDR calls the function -
 


virtual cOsdObject *MainMenuAction(void);

@@ -550,7 +528,6 @@ which can do one of three things:

  • Perform a specific action and return NULL. In that case the main menu will be closed after calling MainMenuAction(). -
  • It is very important that a call to MainMenuAction() returns as soon as possible! As long as the program stays inside this function, no other user @@ -802,6 +779,7 @@ const tI18nPhrase Phrases[] = { "",// TODO "",// TODO "",// TODO + "",// TODO }, { NULL } }; @@ -1200,9 +1178,7 @@ a cDevice:


    cMyReceiver *Receiver = new cMyReceiver(123); -
      cDevice::ActualDevice()->AttachReceiver(Receiver); -

    Noteh the use of cDevice::ActualDevice() here, which makes sure that @@ -1372,7 +1348,6 @@ needed.

    Initializing new devices

    -
      A derived cDevice class shall implement a static function in which it determines whether the necessary hardware to run this sort of device is actually present in this machine (or whatever other prerequisites @@ -1384,7 +1359,6 @@ A plugin that adds devices to a VDR instance shall call this function from its Initialize() function to make sure other plugins that may need to have access to all available devices will see them in their Start() function. -

    Nothing needs to be done to shut down the devices. VDR will automatically shut down (delete) all devices when the program terminates. It is therefore @@ -1500,7 +1474,6 @@ the incoming data (by calling your Action() function). In case you need to do any other setup steps, like opening a file or initializing member variables, you should do so before calling Start().

    -
      If your remote control for some reason can't work (maybe because it was unable to open some file handle it requires) it can implement the virtual function @@ -1510,7 +1483,6 @@ virtual bool Ready(void); and have it return false. In that case VDR will not try to learn keys from that remote control. -
    VDR will handle everything necessary to learn the key mappings of your remote control. In order to do so, it will first call the virtual function Initialize(), in which you should take all necessary steps to make sure your remote control