accessoryservices/accessoryserver/inc/Server/AccSrvQueueObserver.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 /*
       
     2 * Copyright (c) 2002-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:  Interface for notification queue
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef MACCSRVQUEUEOBSERVER_H
       
    21 #define MACCSRVQUEUEOBSERVER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include "AccSrvNotificationQueue.h"
       
    25 
       
    26 // CONSTANTS
       
    27 
       
    28 // MACROS
       
    29 
       
    30 // DATA TYPES
       
    31 
       
    32 // FUNCTION PROTOTYPES
       
    33 
       
    34 // FORWARD DECLARATIONS
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 /**
       
    39 *  Interface class to be used for Notification Queue callbacks.
       
    40 *
       
    41 *  @lib AccServer.lib
       
    42 *  @since S60 3.1
       
    43 */
       
    44 NONSHARABLE_CLASS( MQueueObserver )
       
    45     {
       
    46     public:
       
    47 
       
    48         /**
       
    49         * Called when Queue passes message completion handling to registered observers.
       
    50         *
       
    51         * @since S60 3.1
       
    52         * @param aMsgID     Message in question.
       
    53         * @param aErrorCode Error Code of the operation.
       
    54         * @param aUniqueID  Unique ID of the Generic ID in question.
       
    55         * @return ETrue if the message was consumpted by a observer.
       
    56         *               Call-back order must be renewed after consumption
       
    57         *               if further call-backs are needed.
       
    58         */
       
    59         virtual TBool CompleteMessageL( TMsgID aMsgID,
       
    60                                         TInt aErrorCode,
       
    61                                         TInt aUniqueID ) = 0;
       
    62 
       
    63         /**
       
    64         * Called when Queue passes message completion handling to registered observers.
       
    65         * This is meant for NotifyProcessCommand() completion.
       
    66         *
       
    67         * @since S60 3.1
       
    68         * @param aCmdn                   Type of command in question.
       
    69         * @param aTrId                   Transaction Id of the operation.
       
    70         * @param aASYCommandParamRecord  Data for NotifyProcessCommand() completion.
       
    71         * @param aPtrBuf Pointer to CBufFlat buffer where CAccPolObjectCon object
       
    72         *                is externalized to.
       
    73         * @return ETrue if the message was consumpted by a observer.
       
    74         *               Call-back order must be renewed after consumption
       
    75         *               if further call-backs are needed.
       
    76         */
       
    77         virtual TBool CompleteProcessCommandL( 
       
    78                         TProcessCmdId aCmdn,
       
    79                         TInt aTrId,
       
    80                         TASYCommandParamRecord& aASYCommandParamRecord,
       
    81                         TPtr8* aPtrBuf=NULL ) = 0;
       
    82 
       
    83         /**
       
    84         * Called when Queue passes message completion handling to registered observers.
       
    85         * This is meant for GetValue() and SetValue() type of operations.
       
    86         *
       
    87         * @since S60 3.1
       
    88         * @param aMsgID       Message in question.
       
    89         * @param aCmdResponse Value of the operation, used in GetValue()
       
    90         *                     type of operations.
       
    91         * @param aErrorCode   Error Code of the operation.
       
    92         * @param aTrId        Transaction Id of the operation.
       
    93         * @return void
       
    94         */
       
    95         virtual void HandleValueMessageL( TMsgID aMsgID,
       
    96                                           TAccValueTypeTBool aCmdResponse,
       
    97                                           TInt aErrorCode,
       
    98                                           TInt aTrId ) = 0;
       
    99 
       
   100         /**
       
   101         * Called when Queue passes message completion handling to registered observers.
       
   102         * This is meant for GetValue() and SetValue() type of operations.
       
   103         *
       
   104         * @since S60 3.1
       
   105         * @param aMsgID       Message in question.
       
   106         * @param aCmdResponse Value of the operation, used in GetValue()
       
   107         *                     type of operations.
       
   108         * @param aErrorCode   Error Code of the operation.
       
   109         * @param aTrId        Transaction Id of the operation.
       
   110         * @return void
       
   111         */
       
   112         virtual void HandleValueMessageL( TMsgID aMsgID,
       
   113                                           TAccValueTypeTInt aCmdResponse,
       
   114                                           TInt aErrorCode,
       
   115                                           TInt aTrId ) = 0;
       
   116 
       
   117         /**
       
   118         * Called when Queue passes message completion handling to registered observers.
       
   119         * This is meant for GetValue() and SetValue() type of operations.
       
   120         *
       
   121         * @since S60 3.1
       
   122         * @param aMsgID       Message in question.
       
   123         * @param aCmdResponse Value of the operation, used in GetValue()
       
   124         *                     type of operations.
       
   125         * @param aErrorCode   Error Code of the operation.
       
   126         * @param aTrId        Transaction Id of the operation.
       
   127         * @return void
       
   128         */
       
   129         virtual void HandleValueMessageL( TMsgID aMsgID,
       
   130                                           TDesC8& aCmdResponse,
       
   131                                           TInt aErrorCode,
       
   132                                           TInt aTrId ) = 0;
       
   133                                           
       
   134         /**
       
   135         * Called when Queue passes message completion handling to registered observers.
       
   136         * This is meant for GetValue() and SetValue() type of operations.
       
   137         *
       
   138         * @since S60 5.0
       
   139         * @param aMsgID       Message in question.
       
   140         * @param aTrId        Transaction Id of the operation.
       
   141         * @param aPtrBuf      Value of the operation, used in GetValue()
       
   142         *                     type of operations.
       
   143         * @param aErrorCode   Error Code of the operation.
       
   144         * @return void
       
   145         */
       
   146         virtual void HandleValueMessageL( TMsgID aMsgID,
       
   147                                           TInt aTrId,
       
   148                                           TPtr8* aPtrBuf,
       
   149                                           TInt aErrorCode ) = 0;                                          
       
   150                                           
       
   151     };
       
   152 
       
   153 #endif // MACCSRVQUEUEOBSERVER_H
       
   154 
       
   155 // End of File