|
1 /* |
|
2 * Copyright (c) 2008-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 CONTROL_APP_BINDER_H |
|
19 #define CONTROL_APP_BINDER_H |
|
20 |
|
21 #include <e32cmn.h> |
|
22 #include <e32base.h> |
|
23 |
|
24 #include "usbcontrolappshared.h" |
|
25 |
|
26 |
|
27 _LIT(KUsbControlAppBinderTitle, "BIND"); |
|
28 |
|
29 class CUsbControlAppBinderKeys; |
|
30 |
|
31 NONSHARABLE_CLASS(CUsbControlAppBinderConsole) : public CBase |
|
32 { |
|
33 friend class CUsbControlAppBinderKeys; |
|
34 |
|
35 public: |
|
36 static CUsbControlAppBinderConsole* NewLC(); |
|
37 ~CUsbControlAppBinderConsole(); |
|
38 |
|
39 public: |
|
40 void Start(); |
|
41 void Stop() const; |
|
42 |
|
43 private: |
|
44 CUsbControlAppBinderConsole(); |
|
45 void ConstructL(); |
|
46 void Move(TInt aX, TInt aY); |
|
47 void Draw(); |
|
48 |
|
49 void StartAwareApp(); |
|
50 void StartControlApp(); |
|
51 void StartViewerApp(); |
|
52 |
|
53 private: |
|
54 CConsoleBase* iConsole; |
|
55 CUsbControlAppBinderKeys* iKeys; |
|
56 |
|
57 // Handles for the individual components to run in parallel |
|
58 |
|
59 static RProcess iAwareApp; |
|
60 static RProcess iControlApp; |
|
61 static RProcess iViewerApp; |
|
62 |
|
63 private: |
|
64 // Run on the far right-hand side of the H4 screen, which (for |
|
65 // the TextShell program) is 24 rows, 40 columns - each allows |
|
66 // 2 row/column for borders |
|
67 static const TInt KBinderWindowDepth = (KScreenDepth - 3); |
|
68 static const TInt KBinderWindowWidth = (KScreenWidth - (KViewerNumCharactersOnLine + 4)); |
|
69 }; |
|
70 |
|
71 |
|
72 |
|
73 NONSHARABLE_CLASS(CUsbControlAppBinderKeys) : public CActive |
|
74 { |
|
75 public: |
|
76 static CUsbControlAppBinderKeys* NewL(CUsbControlAppBinderConsole& aUsbControlAppBinderConsole); |
|
77 ~CUsbControlAppBinderKeys(); |
|
78 |
|
79 private: |
|
80 CUsbControlAppBinderKeys(CUsbControlAppBinderConsole& aUsbControlAppBinderConsole); |
|
81 void ConstructL(); |
|
82 void DoCancel(); |
|
83 void RunL(); |
|
84 |
|
85 private: |
|
86 CUsbControlAppBinderConsole& iUsbControlAppBinderConsole; |
|
87 }; |
|
88 |
|
89 |
|
90 #endif // CONTROL_APP_BINDER_H |
|
91 |