|
1 // Copyright (c) 2005-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 // |
|
15 |
|
16 #ifndef _TOBEXCON_H |
|
17 #define _TOBEXCON_H |
|
18 |
|
19 #include <e32test.h> |
|
20 #include <e32cons.h> |
|
21 #include <irdaextensions.h> |
|
22 #include <obex.h> |
|
23 #include <btmanclient.h> |
|
24 #include <obex/internal/obexinternalheader.h> |
|
25 #include <obex/internal/obexinternalconstants.h> |
|
26 #include <btsdp.h> |
|
27 #include <obexfinalpacketobserver.h> |
|
28 #include "constants.h" |
|
29 |
|
30 |
|
31 class CObexClientHandler; |
|
32 class CObexServerHandler; |
|
33 class CObexServerHandlerFile; |
|
34 class CReferenceHandler; |
|
35 |
|
36 class CActiveConsole : public CActive |
|
37 //----------------------------------- |
|
38 { |
|
39 public: |
|
40 // Construction |
|
41 CActiveConsole(CConsoleBase* aConsole); |
|
42 static CActiveConsole* NewLC(CConsoleBase* aConsole); |
|
43 void ConstructL(); |
|
44 |
|
45 // Destruction |
|
46 ~CActiveConsole(); |
|
47 |
|
48 // Issue request |
|
49 void RequestCharacter(); |
|
50 |
|
51 // Cancel request. |
|
52 // Defined as pure virtual by CActive; |
|
53 // implementation provided by this class. |
|
54 void DoCancel(); |
|
55 |
|
56 // Service completed request. |
|
57 // Defined as pure virtual by CActive; |
|
58 // implementation provided by this class, |
|
59 void RunL(); |
|
60 |
|
61 void ProcessKeyPressL(TChar aChar); |
|
62 |
|
63 CConsoleBase* Console(); |
|
64 void SetPassword(TDes& aPassword); |
|
65 void SetInboxRoot(); |
|
66 TBool DisplayHeaders(); |
|
67 void GetString(TDes& aPassword); |
|
68 TBool SetNumber(TUint& aNumber); |
|
69 void ClientErrored(); |
|
70 |
|
71 TBool UseIrdaNickname() const; |
|
72 const TDesC& GetIrdaNickname() const; |
|
73 |
|
74 public: |
|
75 // Data members defined by this class |
|
76 CConsoleBase* iConsole; // A console for reading from |
|
77 CObexClientHandler* iObexClientHandler; // Client wrapper for CObexClient |
|
78 CObexServerHandler* iObexServerHandler; // Client wrapper for CObexServer |
|
79 CObexServerHandlerFile* iObexServerHandlerFile; //Client wrapper for CObexServer |
|
80 TUint iTestMode; |
|
81 TTransport iTransport; |
|
82 CReferenceHandler* iRefHandler; |
|
83 TBool iDisplayHeaders; |
|
84 TPath iInboxRoot; |
|
85 TUint iDiscoverySlots; |
|
86 TUint iDiscoveryAttempts; |
|
87 TUint16 iRecvMTU; |
|
88 TUint16 iTransmitMTU; |
|
89 RIrdaDiscoveryResponseSuppressor iSupp; |
|
90 TBuf<20> iIrDANicknameBuffer; |
|
91 TBool iPerformanceLoggingEnabled; |
|
92 }; |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 class CReferenceHandler : public CBase |
|
98 { |
|
99 public: |
|
100 |
|
101 enum TObexBufObjectComparison |
|
102 { |
|
103 EAllSame = 0, |
|
104 EDifferentName = 1, |
|
105 EDifferentType = 2, |
|
106 EDifferentLength = 4, |
|
107 EDifferentTime = 8, |
|
108 EDifferentDescription = 16, |
|
109 EDifferentTarget = 32, |
|
110 EDifferentBuf = 64, |
|
111 EDifferentHttp = 128, |
|
112 EDifferentAppParam = 256, |
|
113 EDifferentUserDefined = 512, |
|
114 EDifferentCount = 1024, |
|
115 EDifferentCreatorID = 2048, |
|
116 EDifferentWanUUID = 4096, |
|
117 EDifferentObjectClass = 8192}; |
|
118 |
|
119 static CReferenceHandler* NewL(); |
|
120 CReferenceHandler(); |
|
121 ~CReferenceHandler(); |
|
122 |
|
123 void CreateReferenceL(CObexBufObject& aObject, CBufFlat& aObjectBuf, TInt aReferenceId, TTransport aTransport); |
|
124 |
|
125 TInt CompareObjectToReferenceL(CObexBufObject& aObject, CBufFlat& aObjectBuf, TTransport aTransport); |
|
126 |
|
127 private: |
|
128 void CreateReferenceObject1L(CObexBufObject& aObject, CBufFlat& aObjectBuf, TTransport aTransport); |
|
129 void CreateReferenceObject2L(CObexBufObject& aObject, CBufFlat& aObjectBuf, TTransport aTransport); |
|
130 void CreateReferenceObject3L(CObexBufObject& aObject, CBufFlat& aObjectBuf, TTransport aTransport); |
|
131 void CreateReferenceObject4L(CObexBufObject& aObject, CBufFlat& aObjectBuf, TTransport aTransport); |
|
132 void CreateReferenceObject5L(CObexBufObject& aObject, CBufFlat& aObjectBuf, TTransport aTransport); |
|
133 void CreateReferenceObject6L(CObexBufObject& aObject, CBufFlat& aObjectBuf, TTransport aTransport); |
|
134 void CreateReferenceObject7L(CObexBufObject& aObject, CBufFlat& aObjectBuf, TTransport aTransport); |
|
135 void CreateReferenceObject8L(CObexBufObject& aObject, CBufFlat& aObjectBuf, TTransport aTransport); |
|
136 void CreateReferenceObject9L(CObexBufObject& aObject, CBufFlat& aObjectBuf, TTransport aTransport); |
|
137 void CreateReferenceObject10L(CObexBufObject& aObject, CBufFlat& aObjectBuf, TTransport aTransport); |
|
138 |
|
139 }; |
|
140 |
|
141 #endif // _TOBEXCON_H |