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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // $Workfile: IRS.H $ |
|
15 // $Author: Stevep $ |
|
16 // $Revision: 3 $ |
|
17 // $Date: 9/11/01 15:29 $ |
|
18 // |
|
19 // |
|
20 |
|
21 |
|
22 #if !defined(__IRS_H__) |
|
23 #define __IRS_H__ |
|
24 |
|
25 #include <obexservermtm.h> |
|
26 #include <ircmtm.h> // STimeouts |
|
27 #include <obexconstants.h> |
|
28 |
|
29 class CIrHeader; |
|
30 |
|
31 class CIrSrvMtm : public CObexSrvMtm |
|
32 /** |
|
33 @internalTechnology |
|
34 @released |
|
35 */ |
|
36 { |
|
37 public: |
|
38 |
|
39 /** |
|
40 * NewL factory function. Calls ReleaseLibrary() if construction fails. |
|
41 * |
|
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 |
|
46 */ |
|
47 |
|
48 IMPORT_C static CIrSrvMtm* NewL(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aEntry); |
|
49 |
|
50 /** |
|
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 |
|
60 */ |
|
61 |
|
62 IMPORT_C virtual void StartCommandL ( CMsvEntrySelection& aSelection, |
|
63 TInt aCommand, |
|
64 const TDesC8& aParameter, |
|
65 TRequestStatus& aStatus); |
|
66 |
|
67 /** |
|
68 * Destructor. Deletes the header member |
|
69 */ |
|
70 |
|
71 IMPORT_C ~CIrSrvMtm(); |
|
72 |
|
73 /** |
|
74 * Obtains progress information, which, if valid, results in calling Send() |
|
75 */ |
|
76 |
|
77 IMPORT_C void DoRunL(); |
|
78 |
|
79 private: |
|
80 |
|
81 /** |
|
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. |
|
85 */ |
|
86 |
|
87 CIrSrvMtm::CIrSrvMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aEntry); |
|
88 |
|
89 /** |
|
90 * Creates a server send operation to perform the send |
|
91 */ |
|
92 |
|
93 void SendL(); |
|
94 |
|
95 private: |
|
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 |
|
100 }; |
|
101 |
|
102 #endif // __IRS_H__ |
|