os/mm/devsoundextensions/drmaudioplayer/DRMPlayServer/inc/DRMCustomCommandAsyncAO.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/devsoundextensions/drmaudioplayer/DRMPlayServer/inc/DRMCustomCommandAsyncAO.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,80 @@
1.4 +/*
1.5 +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description: DRM Play Server
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +
1.23 +
1.24 +#ifndef DRMCUSTOMCOMMANDASYNCAO_H
1.25 +#define DRMCUSTOMCOMMANDASYNCAO_H
1.26 +
1.27 +#include <e32base.h>
1.28 +#include "DRMPlaySession.h"
1.29 +// #include <mdaaudiosampleplayer.h>
1.30 +
1.31 +class CDRMPlayServerSession;
1.32 +
1.33 +class CDRMCustomCommandAsyncAO : public CActive
1.34 + {
1.35 +public:
1.36 + enum TCustomCommandType
1.37 + {
1.38 + ECustomCommandWithResult,
1.39 + ECustomCommandWithoutResult,
1.40 + };
1.41 +public:
1.42 + static CDRMCustomCommandAsyncAO* NewL( const RMessage2& aMessage,
1.43 + TCustomCommandType aType,
1.44 + CDRMPlayServerSession& aParent );
1.45 + ~CDRMCustomCommandAsyncAO();
1.46 +
1.47 + TMMFMessageDestinationPckg& GetMMFMessageDestinationPckg();
1.48 + TInt GetMMFMessageFunction();
1.49 + // Returns referecens to descriptors,
1.50 + // the descriptors are still owned by this object
1.51 + HBufC8* GetData1FromClient();
1.52 + HBufC8* GetData2FromClient();
1.53 + HBufC8* GetDataToClient();
1.54 +
1.55 + TInt SetActive();
1.56 +
1.57 + void TransferOwnershipL( const RMessage2& aMessage );
1.58 +
1.59 +protected:
1.60 + void RunL();
1.61 + void DoCancel();
1.62 + TInt RunError( TInt aError );
1.63 +
1.64 +private:
1.65 + CDRMCustomCommandAsyncAO( TCustomCommandType aType, CDRMPlayServerSession& aParent );
1.66 + void ConstructL( const RMessage2& aMessage );
1.67 +
1.68 +private:
1.69 + TCustomCommandType iCustomCommandType;
1.70 + TBool iAmCompleted;
1.71 + //TAsyncCallbackStatePckgBuf iCallbackState;
1.72 + CDRMPlayServerSession& iParent;
1.73 + TMMFMessageDestinationPckg iMMFMessageDestinationPckg;
1.74 + TInt iMMFMessageFunction;
1.75 + HBufC8* iData1FromClient;
1.76 + HBufC8* iData2FromClient;
1.77 + HBufC8* iDataToClient;
1.78 + RMessage2* iMessage;
1.79 + };
1.80 +
1.81 +#endif // DRMCUSTOMCOMMANDASYNCAO_H
1.82 +
1.83 +// End of File