sl@0: /* sl@0: * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: DRM Play Server sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: sl@0: #ifndef DRMCUSTOMCOMMANDASYNCAO_H sl@0: #define DRMCUSTOMCOMMANDASYNCAO_H sl@0: sl@0: #include sl@0: #include "DRMPlaySession.h" sl@0: // #include sl@0: sl@0: class CDRMPlayServerSession; sl@0: sl@0: class CDRMCustomCommandAsyncAO : public CActive sl@0: { sl@0: public: sl@0: enum TCustomCommandType sl@0: { sl@0: ECustomCommandWithResult, sl@0: ECustomCommandWithoutResult, sl@0: }; sl@0: public: sl@0: static CDRMCustomCommandAsyncAO* NewL( const RMessage2& aMessage, sl@0: TCustomCommandType aType, sl@0: CDRMPlayServerSession& aParent ); sl@0: ~CDRMCustomCommandAsyncAO(); sl@0: sl@0: TMMFMessageDestinationPckg& GetMMFMessageDestinationPckg(); sl@0: TInt GetMMFMessageFunction(); sl@0: // Returns referecens to descriptors, sl@0: // the descriptors are still owned by this object sl@0: HBufC8* GetData1FromClient(); sl@0: HBufC8* GetData2FromClient(); sl@0: HBufC8* GetDataToClient(); sl@0: sl@0: TInt SetActive(); sl@0: sl@0: void TransferOwnershipL( const RMessage2& aMessage ); sl@0: sl@0: protected: sl@0: void RunL(); sl@0: void DoCancel(); sl@0: TInt RunError( TInt aError ); sl@0: sl@0: private: sl@0: CDRMCustomCommandAsyncAO( TCustomCommandType aType, CDRMPlayServerSession& aParent ); sl@0: void ConstructL( const RMessage2& aMessage ); sl@0: sl@0: private: sl@0: TCustomCommandType iCustomCommandType; sl@0: TBool iAmCompleted; sl@0: //TAsyncCallbackStatePckgBuf iCallbackState; sl@0: CDRMPlayServerSession& iParent; sl@0: TMMFMessageDestinationPckg iMMFMessageDestinationPckg; sl@0: TInt iMMFMessageFunction; sl@0: HBufC8* iData1FromClient; sl@0: HBufC8* iData2FromClient; sl@0: HBufC8* iDataToClient; sl@0: RMessage2* iMessage; sl@0: }; sl@0: sl@0: #endif // DRMCUSTOMCOMMANDASYNCAO_H sl@0: sl@0: // End of File