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.
17 // $Date: 9/11/01 15:29 $
22 #if !defined(__IRS_H__)
25 #include <obexservermtm.h>
26 #include <ircmtm.h> // STimeouts
27 #include <obexconstants.h>
31 class CIrSrvMtm : public CObexSrvMtm
40 * NewL factory function. Calls ReleaseLibrary() if construction fails.
42 * @param aRegisteredMtmDll Registration data for MTM DLL.
43 * @param aEntry Context on which to operate.
44 * @return Pointer to a newly constructed CIrSrvMtm.
45 * @leave KErrXXX System-wide error codes
48 IMPORT_C static CIrSrvMtm* NewL(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aEntry);
51 * Instantiates and initiates a CIrServerSemdOperation class to begin sending the specified OBEX object
52 * via Infrared. Called in response to InvokeAsyncFunctionL() in the client MTM, and passes through
53 * all the arguments passed in to that function. Only supports aCommand==EIrMtmCmdSend
54 * @param aSelection Entry to operate on.
55 * @param aCommand Command to start. Only EIrMtmCmdSend is supported.
56 * @param aParameter Package buffer containing timeout, port and password info needed for the send operation.
57 * @param aStatus Used to notify observer of completion.
58 * @leave KErrNotSupported if aCommand!=EIrMtmCmdSend
59 * @leave KErrXXX if aCommand!= EIrMtmCmdSend
62 IMPORT_C virtual void StartCommandL ( CMsvEntrySelection& aSelection,
64 const TDesC8& aParameter,
65 TRequestStatus& aStatus);
68 * Destructor. Deletes the header member
71 IMPORT_C ~CIrSrvMtm();
74 * Obtains progress information, which, if valid, results in calling Send()
77 IMPORT_C void DoRunL();
82 * Constructor. Calls CObexSrvMtm's constructor in initialisation list.
83 * @param aRegisteredMtmDll Registration data for MTM DLL.
84 * @param aEntry Context on which to operate.
87 CIrSrvMtm::CIrSrvMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aEntry);
90 * Creates a server send operation to perform the send
96 CIrClientMtm::STimeouts iTimeouts; ///< Timeout structure contains connect timeout and a put timeout
97 CIrHeader* iHeader; ///< Infrared OBEX header information
98 TBool iFirstSendAttempt; ///< Boolean value ETrue if it is the first send attempt
99 TObexIrProtocolInfo iProtocolInfo; ///< Protocol info to initialise the CObexClient. Non-const because the CObexClient's NewL() takes a non-const reference