This is a "plugin" for the Video Disk Recorder (VDR).

Written by:                   Sundararaj <balaji.sundararaj@reel-multimedia.com> 
Project's homepage:           reel-multimedia.com
Latest version available at:  reelbox.org

See the file COPYING for license information.

Description:
 
  Displays information about background process that is got by a service call to bgprocess plugin. 

  Here is an example: 

define a function in your plugin:
inline void NotifyBgProcess(std::string name, std::string desc, time_t st_time,int percent_done)
{
            /***
             * for background process list
             * **/

            struct {std::string name; std::string desc; time_t t; float percent; } AProcess;

            AProcess.name = name;
            AProcess.desc = desc;
            AProcess.t = st_time; // start time
            AProcess.percent = percent_done;

            cPlugin *Plugin = cPluginManager::GetPlugin("bgprocess");
            if (Plugin)
                Plugin->Service("bgprocess-data", &AProcess);
}

and call it as 

        NotifyBgProcess("Plugin/process Name", "Process description", start_time, 20); 

To remove a process when it is done from the bgprocess list. Call Service with percent_done > 100 

        NotifyBgProcess("Plugin/process Name", "Process description", start_time, 120);

NOTE: start_time for every call for the same process should be the same. If start_time is different the it is considered a new background process and treated accordingly.  Since internally in bgprocess plugin: "process id" is generated by concatenating AProcess.name + AProcess.t  

