psln/Inc/pslntaskgenericupdate.h
branchRCL_3
changeset 56 d48ab3b357f1
parent 0 2f259fa3e83a
equal deleted inserted replaced
55:aecbbf00d063 56:d48ab3b357f1
       
     1 /*
       
     2 * Copyright (c) 2003-2006 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 "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:  Background task for generic tasks.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_PSLNTASKGENERICUPDATE_H
       
    20 #define C_PSLNTASKGENERICUPDATE_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <e32std.h>
       
    24 #include <AknWaitNoteWrapper.h>
       
    25 
       
    26 class CPslnUi;
       
    27 class CPslnModel;
       
    28 
       
    29 /**  Model funtion pointer. */
       
    30 typedef void ( CPslnModel::* TPslnModelFunctionPtr )();
       
    31 
       
    32 /**
       
    33  *  Background task for generic tasks.
       
    34  *
       
    35  *
       
    36  *  @since S60 v2.0
       
    37  */
       
    38 class CPslnTaskGenericUpdate : public CBase, public MAknBackgroundProcess
       
    39     {
       
    40 public:
       
    41     /**
       
    42     * C++ constructor.
       
    43     * @param aUi reference to UI-class.
       
    44     * @param aModelFunc model function pointer.
       
    45     * @param aUpdateList ETrue is skin list is needed to update.
       
    46     */
       
    47     CPslnTaskGenericUpdate( 
       
    48         CPslnUi& aUi,
       
    49         TPslnModelFunctionPtr aModelFunc, 
       
    50         TBool aUpdateList = ETrue );
       
    51 
       
    52     /**
       
    53     * From MAknBackgroundProcess.
       
    54     * Return ETrue when the process is done.
       
    55     * @return ETrue if process is ready.
       
    56     */
       
    57     TBool IsProcessDone() const;
       
    58 
       
    59     /**
       
    60     * From MAknBackgroundProcess. 
       
    61     * Completes one cycle of the process.
       
    62     */
       
    63     void StepL();
       
    64 
       
    65 private: // data
       
    66 
       
    67 
       
    68     /**
       
    69     * Reference to Psln UI-class.
       
    70     */
       
    71     CPslnUi& iUi;
       
    72 
       
    73     /**
       
    74     * Psln model function to call.
       
    75     */
       
    76     TPslnModelFunctionPtr iModelFunc;
       
    77 
       
    78     /**
       
    79     * Should the skin list be updated.
       
    80     */
       
    81     TBool iUpdateList;
       
    82 
       
    83     /**
       
    84     * Has the task been done.
       
    85     */
       
    86     TBool iDone;
       
    87 
       
    88 public: // Public data
       
    89 
       
    90     /**
       
    91     * Error code for the task, if any.
       
    92     */
       
    93     TInt iCallErr;
       
    94 
       
    95     };
       
    96 
       
    97 #endif // C_PSLNTASKGENERICUPDATE_H