|
1 /* |
|
2 * Copyright (c) 2010 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: Easy dialing test application. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __EDTA_APPVIEW_H__ |
|
19 #define __EDTA_APPVIEW_H__ |
|
20 |
|
21 // INCLUDES |
|
22 #include "edta_screentextbuffer.h" |
|
23 #include <coecntrl.h> |
|
24 #include <MPsResultsObserver.h> |
|
25 #include <mccaconnection.h> |
|
26 #include <dialingextensioninterface.h> |
|
27 |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class CPsClientData; |
|
31 class CPbkContactEngine; |
|
32 class CPsQuery; |
|
33 class CVPbkContactManager; |
|
34 class CVPbkContactStoreUriArray; |
|
35 class MVPbkContactLink; |
|
36 class CPSRequestHandler; |
|
37 class TCCAFactory; |
|
38 class MCCAParameter; |
|
39 class CDialingExtensionInterface; |
|
40 class CDummyListener; |
|
41 |
|
42 |
|
43 |
|
44 // CLASS DECLARATION |
|
45 class CEdtaAppView : public CCoeControl, public MPsResultsObserver, public MCCAObserver, public MDialingExtensionObserver |
|
46 { |
|
47 public: // New methods |
|
48 |
|
49 static CEdtaAppView* NewL( const TRect& aRect ); |
|
50 static CEdtaAppView* NewLC( const TRect& aRect ); |
|
51 virtual ~CEdtaAppView(); |
|
52 |
|
53 TInt CountComponentControls() const; |
|
54 CCoeControl* ComponentControl(TInt aIndex) const; |
|
55 |
|
56 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); |
|
57 |
|
58 CEdtaScreenTextBuffer* GetScreenBuffer(); |
|
59 |
|
60 CDialingExtensionInterface* GetEasyDialer(); |
|
61 |
|
62 void ShowMatchingContactsL(const TDesC& aSearchString); |
|
63 |
|
64 TBool IsPCSServerLoaded(); |
|
65 void CheckPCSServerL(); |
|
66 |
|
67 void ShowNameOrderL(); |
|
68 |
|
69 void LoadPluginL(); |
|
70 |
|
71 void LaunchNthContactL(TInt aIx); |
|
72 |
|
73 void SelectAndLaunchContactL(); |
|
74 |
|
75 void DoMiscellaneousTestsL(); |
|
76 |
|
77 public: // Functions from base classes |
|
78 |
|
79 virtual void SizeChanged(); |
|
80 |
|
81 private: // Constructors |
|
82 |
|
83 void ConstructL(const TRect& aRect); |
|
84 |
|
85 CEdtaAppView(); |
|
86 |
|
87 void Draw( const TRect& aRect ) const; |
|
88 |
|
89 void InitContactDataStoreUrisL(); |
|
90 void InitPredictiveContactSearchL(); |
|
91 |
|
92 private: |
|
93 |
|
94 //MPsResultsObserver functions |
|
95 virtual void HandlePsResultsUpdate(RPointerArray<CPsClientData>& aResults, RPointerArray<CPsPattern>& aSeqs); |
|
96 virtual void HandlePsError(TInt aErrorCode); |
|
97 virtual void CachingStatus(TCachingStatus& aStatus, TInt& aError); |
|
98 |
|
99 /** |
|
100 * Leaving function for Predictive search callback. Call TRAPPED in HandlePsResultsUpdate. |
|
101 */ |
|
102 void HandlePredictiveSearchResultL(RPointerArray<CPsClientData>& aResults, RPointerArray<CPsPattern>& aSeqs); |
|
103 |
|
104 //MCCAObserver functions |
|
105 void CCASimpleNotifyL( TNotifyType aType, TInt aReason ); |
|
106 |
|
107 void HandleDialingExtensionEvent( MDialingExtensionObserver::TEvent aEvent ); |
|
108 |
|
109 private: |
|
110 |
|
111 CEdtaScreenTextBuffer* iScreenBuffer; |
|
112 |
|
113 CPSRequestHandler* iPredictiveContactSearchHandler; |
|
114 |
|
115 CVPbkContactManager* iContactManager; |
|
116 |
|
117 CVPbkContactStoreUriArray* iContactStoreUriArray; |
|
118 |
|
119 RPointerArray<TDesC> iContactDataStores; |
|
120 |
|
121 RPointerArray<TDesC> iContactNames; |
|
122 |
|
123 RPointerArray<MVPbkContactLink> iMatchingContactLinks; |
|
124 |
|
125 CPsQuery* iPredictiveSearchQuery; |
|
126 |
|
127 MCCAConnection* iContactLauncher; |
|
128 |
|
129 /* |
|
130 * Pointer to easy dialing plugin. This may be null, if no plugin present. |
|
131 * Null-check is a must before use. |
|
132 */ |
|
133 CDialingExtensionInterface* iEasyDialer; |
|
134 |
|
135 CDummyListener* iDummyListener; |
|
136 |
|
137 }; |
|
138 |
|
139 #endif // __EDTA_APPVIEW_H__ |
|
140 |
|
141 // End of File |
|
142 |