1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // 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
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // $Workfile: IRCMTM.H $
17 // $Date: 20/11/01 11:19 $
22 #if !defined (__IRCMTM_H__)
25 #include <obexclientmtm.h>
27 class CIrClientMtm : public CObexClientMtm
31 Provides client-side functionality for infrared messaging. This is a thin implementation over the top of
41 * Canonical NewL factory function.
43 * @param aRegisteredMtmDll Reference to registration data for MTM DLL.
44 * @param aMsvSession Reference to CMsvSession of the client requesting the object.
45 * @return Pointer to a new, constructed CIrClientMtm
46 * @leave Leaves if no memory is available.
49 IMPORT_C static CIrClientMtm* NewL(CRegisteredMtmDll& aRegisteredMtmDll, CMsvSession& aMsvSession);
51 /// Contains the timeout values for connect and put operations
54 TInt iConnectTimeout; ///< Connection attempt timeout in microseconds
55 TInt iPutTimeout; ///< Put attempt timeout in microseconds
58 ///Enumeration for commands to be passed to InvokeAsyncFunctionL
61 EIrcCmdSend ///< Send via IR operation
64 // --- RTTI functions ---
67 * Starts an asynchronous messaging function as an active object. Only works for EIrcCmdSend.
69 * @param aFunctionId Identifier of the function to be invoked. Only supports EIrcCmdSend.
70 * @param aSelection Selction of message entries for the requested function to operate on.
71 * @param aParameter Buffer containing input and output parameters.
72 * @param aCompletionStatus Canonical TRequestStatus used for control of the active object.
73 * @return Pointer to a new asynchronously completing CMsvOperation. If failed, this is a completed operation with
74 * status set to the relevant error code.
75 * @leave KErrXXX System-wide error codes
76 * @leave KErrNotSupported if aFunctionId != EIrcCmdSend
79 CMsvOperation* InvokeAsyncFunctionL(TInt aFunctionId,const CMsvEntrySelection& aSelection, TDes8& aParameter, TRequestStatus& aCompletionStatus);
86 * @param aRegisteredMtmDll Registration data for MTM DLL.
87 * @param aMsvSession CMsvSession of the client requesting the object.
90 CIrClientMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvSession& aMsvSession);
93 * Deletes the old header, then creates a new CIrHeader.
95 * @leave KErrXXX System-wide error codes if allocation fails
98 virtual void InitialiseHeaderL();
103 #endif // __IRCMTM_H__