williamr@2: // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // $Workfile: IRCMTM.H $ williamr@2: // $Author: Stevep $ williamr@2: // $Revision: 6 $ williamr@2: // $Date: 20/11/01 11:19 $ williamr@2: // williamr@2: // williamr@2: williamr@2: williamr@2: #if !defined (__IRCMTM_H__) williamr@2: #define __IRCMTM_H__ williamr@2: williamr@2: #include williamr@2: williamr@2: class CIrClientMtm : public CObexClientMtm williamr@2: /** williamr@2: Infrared Client MTM. williamr@2: williamr@2: Provides client-side functionality for infrared messaging. This is a thin implementation over the top of williamr@2: CObexClientMtm. williamr@2: williamr@2: @publishedPartner williamr@2: @released williamr@2: */ williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: * Canonical NewL factory function. williamr@2: * williamr@2: * @param aRegisteredMtmDll Reference to registration data for MTM DLL. williamr@2: * @param aMsvSession Reference to CMsvSession of the client requesting the object. williamr@2: * @return Pointer to a new, constructed CIrClientMtm williamr@2: * @leave Leaves if no memory is available. williamr@2: */ williamr@2: williamr@2: IMPORT_C static CIrClientMtm* NewL(CRegisteredMtmDll& aRegisteredMtmDll, CMsvSession& aMsvSession); williamr@2: williamr@2: /// Contains the timeout values for connect and put operations williamr@2: struct STimeouts williamr@2: { williamr@2: TInt iConnectTimeout; ///< Connection attempt timeout in microseconds williamr@2: TInt iPutTimeout; ///< Put attempt timeout in microseconds williamr@2: }; williamr@2: williamr@2: ///Enumeration for commands to be passed to InvokeAsyncFunctionL williamr@2: enum TAsyncCmds williamr@2: { williamr@2: EIrcCmdSend ///< Send via IR operation williamr@2: }; williamr@2: williamr@2: // --- RTTI functions --- williamr@2: williamr@2: /** williamr@2: * Starts an asynchronous messaging function as an active object. Only works for EIrcCmdSend. williamr@2: * williamr@2: * @param aFunctionId Identifier of the function to be invoked. Only supports EIrcCmdSend. williamr@2: * @param aSelection Selction of message entries for the requested function to operate on. williamr@2: * @param aParameter Buffer containing input and output parameters. williamr@2: * @param aCompletionStatus Canonical TRequestStatus used for control of the active object. williamr@2: * @return Pointer to a new asynchronously completing CMsvOperation. If failed, this is a completed operation with williamr@2: * status set to the relevant error code. williamr@2: * @leave KErrXXX System-wide error codes williamr@2: * @leave KErrNotSupported if aFunctionId != EIrcCmdSend williamr@2: */ williamr@2: williamr@2: CMsvOperation* InvokeAsyncFunctionL(TInt aFunctionId,const CMsvEntrySelection& aSelection, TDes8& aParameter, TRequestStatus& aCompletionStatus); williamr@2: williamr@2: private: williamr@2: williamr@2: /** williamr@2: * Constructor williamr@2: * williamr@2: * @param aRegisteredMtmDll Registration data for MTM DLL. williamr@2: * @param aMsvSession CMsvSession of the client requesting the object. williamr@2: */ williamr@2: williamr@2: CIrClientMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvSession& aMsvSession); williamr@2: williamr@2: /** williamr@2: * Deletes the old header, then creates a new CIrHeader. williamr@2: * williamr@2: * @leave KErrXXX System-wide error codes if allocation fails williamr@2: */ williamr@2: williamr@2: virtual void InitialiseHeaderL(); williamr@2: }; williamr@2: williamr@2: williamr@2: williamr@2: #endif // __IRCMTM_H__