|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 #ifndef __TRKCONNDATA_H__ |
|
18 #define __TRKCONNDATA_H__ |
|
19 |
|
20 |
|
21 _LIT8(KNewLine, "\r\n"); |
|
22 _LIT8(KSpace, " "); |
|
23 |
|
24 _LIT8(KSerialComm, "[SERIALCOMM]"); |
|
25 _LIT8(KBtSocketComm, "[BTSOCKCOMM]"); |
|
26 _LIT8(KDCCComm, "[DCCIO_COMM]"); |
|
27 _LIT8(KXTIComm, "[XTIIO_COMM]"); |
|
28 _LIT8(KDbgTrcComm, "[DBGTRCCOMM]"); |
|
29 |
|
30 _LIT8(KPDD, "PDD"); |
|
31 _LIT8(KLDD, "LDD"); |
|
32 _LIT8(KCSY, "CSY"); |
|
33 _LIT8(KPort, "PORT"); |
|
34 _LIT8(KRate, "RATE"); |
|
35 _LIT8(KPlugPlay, "PlugPlay"); |
|
36 |
|
37 // |
|
38 // Default comm values |
|
39 // |
|
40 #ifdef __WINS__ |
|
41 _LIT(KDefaultPDD, "ECDRV"); |
|
42 #else |
|
43 _LIT(KDefaultPDD, "EUART%d"); |
|
44 #endif |
|
45 _LIT(KDefaultLDD, "ECOMM"); |
|
46 _LIT(KDefaultCSY, "ECUART"); |
|
47 |
|
48 _LIT(KPort0, "0"); |
|
49 _LIT(KPort1, "1"); |
|
50 |
|
51 #define KDefaultPortNumber 0 |
|
52 #define KDefaultUsbPortNumber 1 |
|
53 #define KDefaultRate 115200 |
|
54 |
|
55 |
|
56 //default IR settings |
|
57 _LIT8(KDefaultSerialPDD, "EUART"); |
|
58 _LIT8(KDefaultSerialLDD, "ECOMM"); |
|
59 _LIT8(KDefaultSerialCSY, "ECUART"); |
|
60 _LIT8(KDefaultSerialPort, "0"); |
|
61 |
|
62 //default USB settings |
|
63 _LIT8(KDefaultUsbPDD, "NONE"); |
|
64 _LIT8(KDefaultUsbLDD, "EUSBC"); |
|
65 _LIT8(KDefaultUsbCSY, "ECACM"); |
|
66 _LIT8(KDefaultUsbPort, "1"); |
|
67 |
|
68 //default IR settings |
|
69 _LIT8(KDefaultIrPDD, "EUART"); |
|
70 _LIT8(KDefaultIrLDD, "ECOMM"); |
|
71 _LIT8(KDefaultIrCSY, "IRCOMM"); |
|
72 _LIT8(KDefaultIrPort, "0"); |
|
73 |
|
74 //default BT settings |
|
75 _LIT8(KDefaultBtPort, "1"); |
|
76 |
|
77 //default DCC settings |
|
78 _LIT8(KTrkDCCLDD, "trkdccdriver"); |
|
79 #define KDefaultDCCPort 42 |
|
80 |
|
81 //default Xti settings |
|
82 _LIT8(KTrkXTILDD, "trkxtidriver"); |
|
83 |
|
84 |
|
85 #ifdef __UIQ_BUILD__ |
|
86 _LIT(KInitFilePath, "C:\\Media Files\\document\\"); |
|
87 #else |
|
88 _LIT(KInitFilePath, "C:\\"); |
|
89 #endif |
|
90 _LIT(KInitFileName, "trk.ini"); |
|
91 |
|
92 _LIT(KStatusConnecting,"Status: Connecting ..."); |
|
93 _LIT(KStatusConnected, "Status: Connected"); |
|
94 _LIT(KStatusDisconnected, "Status: Not connected"); |
|
95 _LIT(KStatusError, "Status: Not connected"); |
|
96 |
|
97 _LIT(KCmdLineConnTypeUsb, "-usb"); |
|
98 _LIT(KCmdLineConnTypeXti, "-xti"); |
|
99 |
|
100 |
|
101 //This represents the underlying comms transport that is used for |
|
102 //accessing the actual connection. |
|
103 enum TTrkCommType |
|
104 { |
|
105 ESerialComm = 0, |
|
106 EDbgTrcComm, |
|
107 EBtSocket, |
|
108 ETcpSocket, |
|
109 EUsb, |
|
110 EDcc, |
|
111 EXti, |
|
112 ETrkCommInvalid |
|
113 }; |
|
114 |
|
115 //This represents the actual connection type that is shown to the user through the GUI |
|
116 enum TTrkConnType |
|
117 { |
|
118 ETrkUsbDbgTrc = 0, |
|
119 ETrkBt, |
|
120 ETrkXti, |
|
121 ETrkDcc, |
|
122 ETrkSerial, |
|
123 ETrkUsb, |
|
124 ETrkIr, |
|
125 ETrkConnInvalid |
|
126 }; |
|
127 |
|
128 enum TTrkConnStatus |
|
129 { |
|
130 ETrkNotConnected = 1, |
|
131 ETrkConnecting, |
|
132 ETrkConnected, |
|
133 ETrkConnectionError |
|
134 }; |
|
135 // |
|
136 // Forward declarations |
|
137 // |
|
138 |
|
139 class TTrkConnData |
|
140 { |
|
141 public: |
|
142 TTrkCommType iCommType; |
|
143 TTrkConnType iConnType; |
|
144 |
|
145 TBuf<KMaxFileName> iPDD; |
|
146 TBuf<KMaxFileName> iLDD; |
|
147 TBuf<KMaxFileName> iCSY; |
|
148 TUint iPortNumber; |
|
149 TUint iRate; |
|
150 TBool iDefault; |
|
151 TUint iPlugPlay; |
|
152 }; |
|
153 |
|
154 #endif //__TRKCONNDATA_H__ |