author | William Roberts <williamr@symbian.org> |
Tue, 16 Mar 2010 16:12:26 +0000 | |
branch | Symbian2 |
changeset 2 | 2fe1408b6811 |
permissions | -rw-r--r-- |
williamr@2 | 1 |
// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). |
williamr@2 | 2 |
// All rights reserved. |
williamr@2 | 3 |
// This component and the accompanying materials are made available |
williamr@2 | 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 |
williamr@2 | 5 |
// which accompanies this distribution, and is available |
williamr@2 | 6 |
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
williamr@2 | 7 |
// |
williamr@2 | 8 |
// Initial Contributors: |
williamr@2 | 9 |
// Nokia Corporation - initial contribution. |
williamr@2 | 10 |
// |
williamr@2 | 11 |
// Contributors: |
williamr@2 | 12 |
// |
williamr@2 | 13 |
// Description: |
williamr@2 | 14 |
// $Workfile: IRCMTM.H $ |
williamr@2 | 15 |
// $Author: Stevep $ |
williamr@2 | 16 |
// $Revision: 6 $ |
williamr@2 | 17 |
// $Date: 20/11/01 11:19 $ |
williamr@2 | 18 |
// |
williamr@2 | 19 |
// |
williamr@2 | 20 |
|
williamr@2 | 21 |
|
williamr@2 | 22 |
#if !defined (__IRCMTM_H__) |
williamr@2 | 23 |
#define __IRCMTM_H__ |
williamr@2 | 24 |
|
williamr@2 | 25 |
#include <obexclientmtm.h> |
williamr@2 | 26 |
|
williamr@2 | 27 |
class CIrClientMtm : public CObexClientMtm |
williamr@2 | 28 |
/** |
williamr@2 | 29 |
Infrared Client MTM. |
williamr@2 | 30 |
|
williamr@2 | 31 |
Provides client-side functionality for infrared messaging. This is a thin implementation over the top of |
williamr@2 | 32 |
CObexClientMtm. |
williamr@2 | 33 |
|
williamr@2 | 34 |
@publishedPartner |
williamr@2 | 35 |
@released |
williamr@2 | 36 |
*/ |
williamr@2 | 37 |
{ |
williamr@2 | 38 |
public: |
williamr@2 | 39 |
|
williamr@2 | 40 |
/** |
williamr@2 | 41 |
* Canonical NewL factory function. |
williamr@2 | 42 |
* |
williamr@2 | 43 |
* @param aRegisteredMtmDll Reference to registration data for MTM DLL. |
williamr@2 | 44 |
* @param aMsvSession Reference to CMsvSession of the client requesting the object. |
williamr@2 | 45 |
* @return Pointer to a new, constructed CIrClientMtm |
williamr@2 | 46 |
* @leave Leaves if no memory is available. |
williamr@2 | 47 |
*/ |
williamr@2 | 48 |
|
williamr@2 | 49 |
IMPORT_C static CIrClientMtm* NewL(CRegisteredMtmDll& aRegisteredMtmDll, CMsvSession& aMsvSession); |
williamr@2 | 50 |
|
williamr@2 | 51 |
/// Contains the timeout values for connect and put operations |
williamr@2 | 52 |
struct STimeouts |
williamr@2 | 53 |
{ |
williamr@2 | 54 |
TInt iConnectTimeout; ///< Connection attempt timeout in microseconds |
williamr@2 | 55 |
TInt iPutTimeout; ///< Put attempt timeout in microseconds |
williamr@2 | 56 |
}; |
williamr@2 | 57 |
|
williamr@2 | 58 |
///Enumeration for commands to be passed to InvokeAsyncFunctionL |
williamr@2 | 59 |
enum TAsyncCmds |
williamr@2 | 60 |
{ |
williamr@2 | 61 |
EIrcCmdSend ///< Send via IR operation |
williamr@2 | 62 |
}; |
williamr@2 | 63 |
|
williamr@2 | 64 |
// --- RTTI functions --- |
williamr@2 | 65 |
|
williamr@2 | 66 |
/** |
williamr@2 | 67 |
* Starts an asynchronous messaging function as an active object. Only works for EIrcCmdSend. |
williamr@2 | 68 |
* |
williamr@2 | 69 |
* @param aFunctionId Identifier of the function to be invoked. Only supports EIrcCmdSend. |
williamr@2 | 70 |
* @param aSelection Selction of message entries for the requested function to operate on. |
williamr@2 | 71 |
* @param aParameter Buffer containing input and output parameters. |
williamr@2 | 72 |
* @param aCompletionStatus Canonical TRequestStatus used for control of the active object. |
williamr@2 | 73 |
* @return Pointer to a new asynchronously completing CMsvOperation. If failed, this is a completed operation with |
williamr@2 | 74 |
* status set to the relevant error code. |
williamr@2 | 75 |
* @leave KErrXXX System-wide error codes |
williamr@2 | 76 |
* @leave KErrNotSupported if aFunctionId != EIrcCmdSend |
williamr@2 | 77 |
*/ |
williamr@2 | 78 |
|
williamr@2 | 79 |
CMsvOperation* InvokeAsyncFunctionL(TInt aFunctionId,const CMsvEntrySelection& aSelection, TDes8& aParameter, TRequestStatus& aCompletionStatus); |
williamr@2 | 80 |
|
williamr@2 | 81 |
private: |
williamr@2 | 82 |
|
williamr@2 | 83 |
/** |
williamr@2 | 84 |
* Constructor |
williamr@2 | 85 |
* |
williamr@2 | 86 |
* @param aRegisteredMtmDll Registration data for MTM DLL. |
williamr@2 | 87 |
* @param aMsvSession CMsvSession of the client requesting the object. |
williamr@2 | 88 |
*/ |
williamr@2 | 89 |
|
williamr@2 | 90 |
CIrClientMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvSession& aMsvSession); |
williamr@2 | 91 |
|
williamr@2 | 92 |
/** |
williamr@2 | 93 |
* Deletes the old header, then creates a new CIrHeader. |
williamr@2 | 94 |
* |
williamr@2 | 95 |
* @leave KErrXXX System-wide error codes if allocation fails |
williamr@2 | 96 |
*/ |
williamr@2 | 97 |
|
williamr@2 | 98 |
virtual void InitialiseHeaderL(); |
williamr@2 | 99 |
}; |
williamr@2 | 100 |
|
williamr@2 | 101 |
|
williamr@2 | 102 |
|
williamr@2 | 103 |
#endif // __IRCMTM_H__ |