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: IRS.H $ williamr@2: // $Author: Stevep $ williamr@2: // $Revision: 3 $ williamr@2: // $Date: 9/11/01 15:29 $ williamr@2: // williamr@2: // williamr@2: williamr@2: williamr@2: #if !defined(__IRS_H__) williamr@2: #define __IRS_H__ williamr@2: williamr@2: #include williamr@2: #include // STimeouts williamr@2: #include williamr@2: williamr@2: class CIrHeader; williamr@2: williamr@2: class CIrSrvMtm : public CObexSrvMtm williamr@2: /** williamr@2: @internalTechnology williamr@2: @released williamr@2: */ williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: * NewL factory function. Calls ReleaseLibrary() if construction fails. williamr@2: * williamr@2: * @param aRegisteredMtmDll Registration data for MTM DLL. williamr@2: * @param aEntry Context on which to operate. williamr@2: * @return Pointer to a newly constructed CIrSrvMtm. williamr@2: * @leave KErrXXX System-wide error codes williamr@2: */ williamr@2: williamr@2: IMPORT_C static CIrSrvMtm* NewL(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aEntry); williamr@2: williamr@2: /** williamr@2: * Instantiates and initiates a CIrServerSemdOperation class to begin sending the specified OBEX object williamr@2: * via Infrared. Called in response to InvokeAsyncFunctionL() in the client MTM, and passes through williamr@2: * all the arguments passed in to that function. Only supports aCommand==EIrMtmCmdSend williamr@2: * @param aSelection Entry to operate on. williamr@2: * @param aCommand Command to start. Only EIrMtmCmdSend is supported. williamr@2: * @param aParameter Package buffer containing timeout, port and password info needed for the send operation. williamr@2: * @param aStatus Used to notify observer of completion. williamr@2: * @leave KErrNotSupported if aCommand!=EIrMtmCmdSend williamr@2: * @leave KErrXXX if aCommand!= EIrMtmCmdSend williamr@2: */ williamr@2: williamr@2: IMPORT_C virtual void StartCommandL ( CMsvEntrySelection& aSelection, williamr@2: TInt aCommand, williamr@2: const TDesC8& aParameter, williamr@2: TRequestStatus& aStatus); williamr@2: williamr@2: /** williamr@2: * Destructor. Deletes the header member williamr@2: */ williamr@2: williamr@2: IMPORT_C ~CIrSrvMtm(); williamr@2: williamr@2: /** williamr@2: * Obtains progress information, which, if valid, results in calling Send() williamr@2: */ williamr@2: williamr@2: IMPORT_C void DoRunL(); williamr@2: williamr@2: private: williamr@2: williamr@2: /** williamr@2: * Constructor. Calls CObexSrvMtm's constructor in initialisation list. williamr@2: * @param aRegisteredMtmDll Registration data for MTM DLL. williamr@2: * @param aEntry Context on which to operate. williamr@2: */ williamr@2: williamr@2: CIrSrvMtm::CIrSrvMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aEntry); williamr@2: williamr@2: /** williamr@2: * Creates a server send operation to perform the send williamr@2: */ williamr@2: williamr@2: void SendL(); williamr@2: williamr@2: private: williamr@2: CIrClientMtm::STimeouts iTimeouts; ///< Timeout structure contains connect timeout and a put timeout williamr@2: CIrHeader* iHeader; ///< Infrared OBEX header information williamr@2: TBool iFirstSendAttempt; ///< Boolean value ETrue if it is the first send attempt williamr@2: TObexIrProtocolInfo iProtocolInfo; ///< Protocol info to initialise the CObexClient. Non-const because the CObexClient's NewL() takes a non-const reference williamr@2: }; williamr@2: williamr@2: #endif // __IRS_H__