|
1 /* |
|
2 * Copyright (c) 2005-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 |
|
18 #ifndef SIMPLEOBEXAPP_H |
|
19 #define SIMPLEOBEXAPP_H |
|
20 |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <e32cons.h> |
|
24 #include <obex.h> |
|
25 #include <btsdp.h> |
|
26 #include <d32usbc.h> |
|
27 |
|
28 |
|
29 |
|
30 #ifdef __WINS__ |
|
31 _LIT(KWinsPddName,"ecdrv"); |
|
32 _LIT(KWinsLddName,"ecomm"); |
|
33 #endif //__WINS__ |
|
34 |
|
35 |
|
36 _LIT(KEusbc,"EUSBC"); |
|
37 |
|
38 |
|
39 enum Mode |
|
40 { |
|
41 E_Inactive, |
|
42 E_Server, |
|
43 E_Server_File, |
|
44 E_Client, |
|
45 E_Client_Connect_Menu, |
|
46 E_Client_Setup_Menu, |
|
47 E_SdpQuery |
|
48 |
|
49 }; |
|
50 |
|
51 enum TTransport |
|
52 { |
|
53 EBluetooth, |
|
54 EIrda, |
|
55 EUsb, |
|
56 EWin32Usb |
|
57 }; |
|
58 |
|
59 |
|
60 |
|
61 class CObexClientHandler; |
|
62 class CObexServerHandler; |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 /** |
|
68 * CActiveConsole is a CActive derived class, it is used to provide |
|
69 * a means for the user to interact with the OBEX application. It provides |
|
70 * a test shell menu for the user to select options from, it is also responsible for |
|
71 * initialising user selected processes. |
|
72 */ |
|
73 |
|
74 class CActiveConsole : public CActive |
|
75 { |
|
76 public: |
|
77 static CActiveConsole* NewLC(CConsoleBase* aConsole); |
|
78 ~CActiveConsole(); |
|
79 |
|
80 void DoCancel(); |
|
81 void RunL(); |
|
82 void RequestCharacter(); |
|
83 void ProcessKeyPressL(TChar aChar); |
|
84 void DoUsbInitialisationL(); |
|
85 |
|
86 CConsoleBase* Console(); |
|
87 private: |
|
88 void ConstructL(); |
|
89 CActiveConsole(CConsoleBase* aConsole); |
|
90 |
|
91 public: |
|
92 // Data members defined by this class |
|
93 CConsoleBase* iConsole; // A console for reading from |
|
94 CObexClientHandler* iObexClientHandler; // Client wrapper for CObexClient |
|
95 CObexServerHandler* iObexServerHandler; // Client wrapper for CObexServer |
|
96 TUint iMode; |
|
97 TTransport iTransport; |
|
98 RDevUsbcClient iUsbDriver; |
|
99 |
|
100 }; |
|
101 |
|
102 |
|
103 |
|
104 |
|
105 #endif // SIMPLEOBEXAPP_H |