sl@0: /* sl@0: * Copyright (c) 2005-2009 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: sl@0: * sl@0: */ sl@0: sl@0: sl@0: #ifndef ACTIVECALLBACKWRAP_H_ sl@0: #define ACTIVECALLBACKWRAP_H_ sl@0: sl@0: sl@0: //#include sl@0: sl@0: #include "activecallback.h" sl@0: sl@0: sl@0: class CActiveCallbackWrap sl@0: { sl@0: public: sl@0: sl@0: static CActiveCallbackWrap* NewLC(MActiveCallback& aCallback, TInt aFunctionId, TInt aExpectedAsyncError = KErrNone); sl@0: static CActiveCallbackWrap* NewL(MActiveCallback& aCallback, TInt aFunctionId, TInt aExpectedAsyncError = KErrNone); sl@0: virtual ~CActiveCallbackWrap(); sl@0: sl@0: sl@0: CActiveCallback& ActiveCallback() { return *iActiveCallback ; } sl@0: TInt FunctionId() const { return iFunctionId; } sl@0: TInt ExpectedAsyncError() const { return iExpectedAsyncError; } sl@0: void SetDesData(HBufC8* aData); sl@0: void SetExpectedDesData(HBufC8* aData); sl@0: HBufC8* Data() { return iData; } sl@0: HBufC8* ExpectedData() { return iExpectedData; } sl@0: TPtr8& DataPtr() { return iDataPtr; } sl@0: TPtr8& ExpectedDataPtr() { return iExpectedDataPtr; } sl@0: sl@0: protected: sl@0: CActiveCallbackWrap(TInt aFunctionId, TInt aExpectedAsyncError); sl@0: void ConstructL(MActiveCallback& aCallback); sl@0: sl@0: private: sl@0: TInt iFunctionId; sl@0: CActiveCallback* iActiveCallback; sl@0: TInt iExpectedAsyncError; sl@0: HBufC8* iData; sl@0: HBufC8* iExpectedData; sl@0: TPtr8 iDataPtr; sl@0: TPtr8 iExpectedDataPtr; sl@0: }; sl@0: sl@0: #endif /*ACTIVECALLBACKWRAP_H_*/