epoc32/include/ircmtm.h
branchSymbian2
changeset 2 2fe1408b6811
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/ircmtm.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,103 @@
     1.4 +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// 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
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// $Workfile: IRCMTM.H $
    1.18 +// $Author: Stevep $
    1.19 +// $Revision: 6 $
    1.20 +// $Date: 20/11/01 11:19 $
    1.21 +// 
    1.22 +//
    1.23 +
    1.24 +
    1.25 +#if !defined (__IRCMTM_H__)
    1.26 +#define __IRCMTM_H__
    1.27 +
    1.28 +#include <obexclientmtm.h>
    1.29 +
    1.30 +class CIrClientMtm : public CObexClientMtm
    1.31 +/**
    1.32 +Infrared Client MTM.
    1.33 +
    1.34 +Provides client-side functionality for infrared messaging. This is a thin implementation over the top of
    1.35 +CObexClientMtm.
    1.36 + 
    1.37 +@publishedPartner
    1.38 +@released
    1.39 +*/
    1.40 +	{
    1.41 +public:
    1.42 +
    1.43 +	/**
    1.44 +	 * Canonical NewL factory function. 
    1.45 +	 *
    1.46 +	 * @param aRegisteredMtmDll Reference to registration data for MTM DLL.
    1.47 +	 * @param aMsvSession Reference to CMsvSession of the client requesting the object.
    1.48 +	 * @return Pointer to a new, constructed CIrClientMtm
    1.49 +	 * @leave Leaves if no memory is available.
    1.50 +	 */
    1.51 +
    1.52 +	IMPORT_C static CIrClientMtm* NewL(CRegisteredMtmDll& aRegisteredMtmDll, CMsvSession& aMsvSession);
    1.53 +
    1.54 +	/// Contains the timeout values for connect and put operations
    1.55 +	struct STimeouts
    1.56 +		{
    1.57 +		TInt iConnectTimeout; ///< Connection attempt timeout in microseconds
    1.58 +		TInt iPutTimeout;	  ///< Put attempt timeout in microseconds
    1.59 +		};
    1.60 +
    1.61 +	///Enumeration for commands to be passed to InvokeAsyncFunctionL
    1.62 +	enum TAsyncCmds
    1.63 +		{
    1.64 +		EIrcCmdSend ///< Send via IR operation
    1.65 +		};
    1.66 +
    1.67 +	// --- RTTI functions ---
    1.68 +	
    1.69 +	/**
    1.70 +	 * Starts an asynchronous messaging function as an active object. Only works for EIrcCmdSend.
    1.71 +	 *
    1.72 +	 * @param aFunctionId Identifier of the function to be invoked. Only supports EIrcCmdSend.
    1.73 +	 * @param aSelection Selction of message entries for the requested function to operate on.
    1.74 +	 * @param aParameter Buffer containing input and output parameters.
    1.75 +	 * @param aCompletionStatus Canonical TRequestStatus used for control of the active object.
    1.76 +	 * @return Pointer to a new asynchronously completing CMsvOperation. If failed, this is a completed operation with 
    1.77 +	 * status set to the relevant error code.
    1.78 +	 * @leave KErrXXX System-wide error codes
    1.79 +	 * @leave KErrNotSupported if aFunctionId != EIrcCmdSend
    1.80 +	 */
    1.81 +	
    1.82 +	CMsvOperation* InvokeAsyncFunctionL(TInt aFunctionId,const CMsvEntrySelection& aSelection, TDes8& aParameter, TRequestStatus& aCompletionStatus);
    1.83 +
    1.84 +private:
    1.85 +	
    1.86 +	/**
    1.87 +	 * Constructor
    1.88 +	 *
    1.89 +	 * @param aRegisteredMtmDll Registration data for MTM DLL.
    1.90 +	 * @param aMsvSession CMsvSession of the client requesting the object.
    1.91 +	 */
    1.92 +
    1.93 +	CIrClientMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvSession& aMsvSession);
    1.94 +	
    1.95 +	/**
    1.96 +	 * Deletes the old header, then creates a new CIrHeader.	
    1.97 +	 *
    1.98 +	 *  @leave KErrXXX System-wide error codes if allocation fails
    1.99 +	 */
   1.100 +		
   1.101 +	virtual void InitialiseHeaderL();
   1.102 +	};
   1.103 +
   1.104 +
   1.105 +
   1.106 +#endif // __IRCMTM_H__