mmappfw_plat/mpx_common_api/inc/mpxtaskqueueobserver.h
changeset 0 a2952bb97e68
equal deleted inserted replaced
-1:000000000000 0:a2952bb97e68
       
     1 /*
       
     2 * Copyright (c) 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:  Task queue observer
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MMPXTASKQUEUEOBSERVER_H
       
    20 #define MMPXTASKQUEUEOBSERVER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 /**
       
    25 *  Mix-in class for callback.
       
    26 *
       
    27 *  @lib MPXCommon.lib
       
    28 */
       
    29 NONSHARABLE_CLASS( MMPXTaskQueueObserver )
       
    30     {
       
    31 public:
       
    32     /**
       
    33     * Execute a task.
       
    34     *
       
    35     * @since S60 3.2.3
       
    36     * @param aTask task number
       
    37     * @param aParamData parameter
       
    38     * @param aPtrData pointer to any object
       
    39     * @param aBuf buffer containing externalized parameters for the task.
       
    40     * @param aCallback call back function pointer
       
    41     * @param aCObject1 object 1 owned by task queue
       
    42     * @param aCObject2 object 2 owned by task queue
       
    43     */
       
    44     virtual void ExecuteTask(TInt aTask,
       
    45                              TInt aParamData,
       
    46                              TAny* aPtrData,
       
    47                              const CBufBase& aBuf,
       
    48                              TAny* aCallback,
       
    49                              CBase* aCObject1,
       
    50                              CBase* aCObject2) = 0;
       
    51 
       
    52     /**
       
    53     * Indicates that the specified task was completed with an error. This may have happened
       
    54     * before the task was actually executed.
       
    55     *
       
    56     * @since S60 3.2.3
       
    57     * @param aTask task number
       
    58     * @param aPtrData pointer to any object
       
    59     * @param aCallback call back function pointer
       
    60     * @param aError error code
       
    61     */
       
    62     virtual void HandleTaskError(TInt /* aTask */,
       
    63                                  TAny* /*aPtrData*/,
       
    64                                  TAny* /*aCallback*/,
       
    65                                  TInt /* aError */){};
       
    66     };
       
    67 
       
    68 #endif // MMPXTASKQUEUEOBSERVER_H