|
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 |
|
18 #ifndef __TRKAPPVIEW_H |
|
19 #define __TRKAPPVIEW_H |
|
20 |
|
21 #include <viewcli.h> |
|
22 #include <aknview.h> |
|
23 #include "TrkConnData.h" |
|
24 #include "trkservereventcallback.h" |
|
25 #include "trksrvclisession.h" |
|
26 |
|
27 // |
|
28 // |
|
29 // CTrkAppView |
|
30 // |
|
31 // |
|
32 class CTrkSettingsData; |
|
33 class CTrkAppContainer; |
|
34 class CTrkServerEventListener; |
|
35 |
|
36 class CTrkAppView : public CAknView, public MTrkServerEventCallback |
|
37 { |
|
38 public: |
|
39 |
|
40 static CTrkAppView* NewL(CTrkSettingsData* aSettings, RTrkSrvCliSession& aTrkSession); |
|
41 ~CTrkAppView(); |
|
42 void ConstructL(); |
|
43 |
|
44 /** |
|
45 * Handle screen size change. |
|
46 * @since 2.8 |
|
47 */ |
|
48 void HandleSizeChange(); |
|
49 |
|
50 TBool IsConnected() { return iConnStatus == ETrkConnected; } |
|
51 TTrkConnStatus GetConnectionStatus(){ return iConnStatus; } |
|
52 |
|
53 void GetConnectionMsg(TDes& aMessage); |
|
54 |
|
55 public: |
|
56 // From MTrkServerEventCallback |
|
57 void DebugStateChanged(TBool& aDebugging); |
|
58 void ConnectionStateChanged(TTrkConnStatus& aConnStatus); |
|
59 |
|
60 private: |
|
61 |
|
62 /** |
|
63 * From CAknView |
|
64 */ |
|
65 TUid Id() const; |
|
66 |
|
67 /** |
|
68 * From CAknView |
|
69 */ |
|
70 void HandleCommandL(TInt aCommand); |
|
71 |
|
72 /** |
|
73 * From CAknView |
|
74 */ |
|
75 void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId, |
|
76 const TDesC8& aCustomMessage); |
|
77 |
|
78 /** |
|
79 * From CAknView |
|
80 */ |
|
81 void DoDeactivate(); |
|
82 |
|
83 /** |
|
84 * From MCoeView |
|
85 */ |
|
86 void ViewActivatedL(const TVwsViewId& aPrevViewId, TUid aCustomMessageId, const TDesC8& aCustomMessage); |
|
87 |
|
88 /** |
|
89 * Adjusts the visible items in menu pane accordding to |
|
90 * socket engine state. |
|
91 * @aResourceId Resource ID identifying the menu pane to initialise |
|
92 * @aMenuPane The in-memory representation of the menu pane |
|
93 */ |
|
94 void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); |
|
95 |
|
96 void HandleStatusPaneSizeChange(); |
|
97 |
|
98 |
|
99 private: |
|
100 CTrkAppView(CTrkSettingsData* aSettings, RTrkSrvCliSession& aTrkSession); |
|
101 |
|
102 TInt CloseCrashLogger(); |
|
103 TInt TerminateProcess(const TDesC& aProcessName); |
|
104 |
|
105 TTrkConnType GetCmdLineConnTypeL(); |
|
106 |
|
107 private: |
|
108 |
|
109 CTrkSettingsData* iSettingsData; |
|
110 CTrkAppContainer* iContainer; |
|
111 //CVwsSessionWrapper* iVwsSession; |
|
112 RTrkSrvCliSession& iTrkSession; |
|
113 TVwsViewId iPrevViewId; |
|
114 |
|
115 TInt iMajorVersion; |
|
116 TInt iMinorVersion; |
|
117 TInt iMajorAPIVersion; |
|
118 TInt iMinorAPIVersion; |
|
119 TInt iBuildNumber; |
|
120 TTrkConnStatus iConnStatus; |
|
121 |
|
122 TBuf<KMaxPath> iConnMsg; |
|
123 |
|
124 TBool iDebugging; |
|
125 |
|
126 CTrkServerEventListener* iTrkDebugStateListener; |
|
127 CTrkServerEventListener* iTrkConnStateListener; |
|
128 }; |
|
129 |
|
130 #endif //__TRKAPPVIEW_H |
|
131 |