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