devsoundextensions/drmaudioplayer/DRMPlayServer/inc/DRMCustomCommandAsyncAO.h
changeset 0 40261b775718
child 20 67584cc761d1
equal deleted inserted replaced
-1:000000000000 0:40261b775718
       
     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:   DRM Play Server
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef DRMCUSTOMCOMMANDASYNCAO_H
       
    22 #define DRMCUSTOMCOMMANDASYNCAO_H
       
    23 
       
    24 #include <e32base.h>
       
    25 #include "DRMPlaySession.h"
       
    26 // #include <MdaAudioSamplePlayer.h>
       
    27 
       
    28 class CDRMPlayServerSession;
       
    29 
       
    30 class CDRMCustomCommandAsyncAO : public CActive
       
    31     {
       
    32 public:
       
    33     enum TCustomCommandType
       
    34         {
       
    35         ECustomCommandWithResult,
       
    36         ECustomCommandWithoutResult,
       
    37         };
       
    38 public:
       
    39     static CDRMCustomCommandAsyncAO* NewL( const RMessage2& aMessage, 
       
    40                                            TCustomCommandType aType,
       
    41                                            CDRMPlayServerSession& aParent );
       
    42     ~CDRMCustomCommandAsyncAO();
       
    43     
       
    44     TMMFMessageDestinationPckg& GetMMFMessageDestinationPckg();
       
    45     TInt GetMMFMessageFunction();
       
    46     // Returns referecens to descriptors,
       
    47     // the descriptors are still owned by this object
       
    48     HBufC8* GetData1FromClient();
       
    49     HBufC8* GetData2FromClient();
       
    50     HBufC8* GetDataToClient();
       
    51     
       
    52     TInt SetActive();
       
    53     
       
    54     void TransferOwnershipL( const RMessage2& aMessage );
       
    55     
       
    56 protected:
       
    57     void RunL();
       
    58     void DoCancel();
       
    59     TInt RunError( TInt aError );
       
    60     
       
    61 private:
       
    62     CDRMCustomCommandAsyncAO( TCustomCommandType aType, CDRMPlayServerSession& aParent );
       
    63     void ConstructL( const RMessage2& aMessage );
       
    64     
       
    65 private:
       
    66     TCustomCommandType iCustomCommandType;
       
    67     TBool iAmCompleted;
       
    68     //TAsyncCallbackStatePckgBuf  iCallbackState;
       
    69     CDRMPlayServerSession& iParent;
       
    70     TMMFMessageDestinationPckg iMMFMessageDestinationPckg;
       
    71     TInt iMMFMessageFunction;
       
    72     HBufC8* iData1FromClient;
       
    73     HBufC8* iData2FromClient;
       
    74     HBufC8* iDataToClient;
       
    75     RMessage2* iMessage;
       
    76     };
       
    77 
       
    78 #endif // DRMCUSTOMCOMMANDASYNCAO_H
       
    79 
       
    80 // End of File