videofeeds/scheduleddlplugin/inc/iptvscheduleddownloadlugin.h
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:    Implementation of the scheduled download plugin*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 #ifndef CIPTVSCHEDULEDDOWNLOADPLUGIN_H
       
    20 #define CIPTVSCHEDULEDDOWNLOADPLUGIN_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <ipvideo/CCseSchedulerPluginIF.h>
       
    24 #include <e32std.h>
       
    25 
       
    26 // CONSTANTS
       
    27 // None
       
    28 
       
    29 // MACROS
       
    30 // None.
       
    31 
       
    32 // DATA TYPES
       
    33 // None.
       
    34 
       
    35 // FUNCTION PROTOTYPES
       
    36 // None.
       
    37 
       
    38 // FORWARD DECLARATIONS
       
    39 class CCseScheduledProgram;
       
    40 class MCsePluginObserver;
       
    41 class CIptvScheduledDownloadPluginEngine;
       
    42 
       
    43 // CLASS DECLARATION    
       
    44 /**
       
    45 *  Implementation of the scheduled download plugin
       
    46 *
       
    47 *  @lib iptvscheduleddownloadplugin.dll
       
    48 */
       
    49 class CIptvScheduledDownloadPlugin : public CCseSchedulerPluginIF
       
    50 	{
       
    51     public:// Constructors and destructor
       
    52 
       
    53         /**
       
    54         * Two-phased constructor.        
       
    55         */
       
    56     	static CIptvScheduledDownloadPlugin* NewL();
       
    57     	
       
    58     	/**
       
    59         * C+ destructor
       
    60         */
       
    61     	virtual ~CIptvScheduledDownloadPlugin();    	
       
    62    
       
    63     public: // From CCseSchedulerPluginIF
       
    64 
       
    65         /**
       
    66         * Runs given task in plugin.
       
    67         * @param    aProg       Schedule to be run in plugin.
       
    68         * @param    aObserver   Pointer back to scheduling engine. Called
       
    69         *                       when schedule is completed or error occurs.
       
    70         */	
       
    71     	void RunTaskL( CCseScheduledProgram& aProg,
       
    72     				   MCsePluginObserver* aObserver );
       
    73 
       
    74     private:// Constructors and destructor
       
    75 
       
    76         /**
       
    77         * C++ constructor
       
    78         */
       
    79     	CIptvScheduledDownloadPlugin();
       
    80 
       
    81         /**
       
    82         * Reschedule the given schedule.
       
    83         *
       
    84         * @param aObserver The schedule callback.
       
    85         * @param aProg The schedule to reschedule.
       
    86         * @param aDelay The delay of the reschedule.
       
    87         */
       
    88         void RescheduleL(
       
    89             MCsePluginObserver* aObserver,
       
    90             CCseScheduledProgram& aProg,
       
    91             TTimeIntervalMinutes aDelay );
       
    92 
       
    93     private: // Data
       
    94 
       
    95         /**
       
    96         * Pointer to plug-in engine. Owned.
       
    97         */
       
    98         CIptvScheduledDownloadPluginEngine* iEngine;
       
    99         
       
   100         /**
       
   101          * Boolean pointer representing if we have aborted the plugin
       
   102          * operation by deleting this class. Value is red after iEngine->RunTaskL
       
   103          * -call in RunTaskL -method. If value is true we return immediately. 
       
   104          */
       
   105         TBool* iIsDead;        
       
   106 	};
       
   107 
       
   108 #endif // CIPTVSCHEDULEDDOWNLOADPLUGIN_H