|
1 /* |
|
2 * Copyright (c) 2005-2007 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: Phonebook 2 selection service AIW provider. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPBK2AIWSELECTIONPROVIDER_H |
|
20 #define CPBK2AIWSELECTIONPROVIDER_H |
|
21 |
|
22 // INCLUDE FILES |
|
23 #include <AiwServiceIfBase.h> |
|
24 #include "MPbk2ConnectionObserver.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CPbk2ServerAppConnection; |
|
28 class RVPbkContactFieldDefaultPriorities; |
|
29 class CVPbkFieldTypeSelector; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * Phonebook 2 selection service AIW provider. |
|
35 * Responsible for: |
|
36 * - Implementing AIW provider API for selection service |
|
37 * - Verifying parameters passed by the consumer |
|
38 * - Packing the consumer passed data to an IPC package |
|
39 */ |
|
40 class CPbk2AiwSelectionProvider : public CAiwServiceIfBase, |
|
41 public MPbk2ConnectionObserver |
|
42 { |
|
43 public: // Construction and destruction |
|
44 |
|
45 /** |
|
46 * Creates a new instance of this class. |
|
47 * |
|
48 * @return A new instance of this class. |
|
49 */ |
|
50 static CPbk2AiwSelectionProvider* NewL(); |
|
51 |
|
52 /** |
|
53 * Destructor. |
|
54 */ |
|
55 ~CPbk2AiwSelectionProvider(); |
|
56 |
|
57 public: // From CAiwServiceIfBase |
|
58 void InitialiseL( |
|
59 MAiwNotifyCallback& aFrameworkCallback, |
|
60 const RCriteriaArray& aInterest ); |
|
61 void HandleServiceCmdL( |
|
62 const TInt& aCmdId, |
|
63 const CAiwGenericParamList& aInParamList, |
|
64 CAiwGenericParamList& aOutParamList, |
|
65 TUint aCmdOptions = 0, |
|
66 const MAiwNotifyCallback* aCallback = NULL ); |
|
67 |
|
68 public: // From MPbk2ConnectionObserver |
|
69 void OperationCompleteL( |
|
70 const TDesC8& aContactLinks, |
|
71 TInt aExtraResultData, |
|
72 const TDesC& aField ); |
|
73 void OperationCanceledL(); |
|
74 void OperationErrorL( |
|
75 TInt aError ); |
|
76 TBool OkToExitL( |
|
77 TInt aCommandId, |
|
78 TPbk2ExitCommandParams aExitParameter ); |
|
79 TBool AcceptSelectionL( |
|
80 TInt aNumberOfSelectedContacts, |
|
81 HBufC8& aContactLink ); |
|
82 |
|
83 private: // Implementation |
|
84 CPbk2AiwSelectionProvider(); |
|
85 HBufC8* PackParameterToBufferL( |
|
86 TGenericParamId aParamId, |
|
87 const CAiwGenericParamList& aInParamList) const; |
|
88 void PackParameterToBufferL( |
|
89 HBufC8*& aTargetBuffer, |
|
90 TGenericParamId aParamId, |
|
91 const CAiwGenericParamList& aInParamList ); |
|
92 void CreateConfigurationPackageL( |
|
93 const CAiwGenericParamList& aInParamList ); |
|
94 void CreateInstructionPackageL( |
|
95 const CAiwGenericParamList& aInParamList ); |
|
96 void ValidateInstructionPackageL(); |
|
97 HBufC* ClientTitlePaneL(); |
|
98 |
|
99 private: // Data |
|
100 /// Ref: AIW notify call back |
|
101 const MAiwNotifyCallback* iCallback; |
|
102 /// Ref: AIW incoming parameter list |
|
103 const CAiwGenericParamList* iInParamList; |
|
104 /// Own: AIW event param list for event sending |
|
105 CAiwGenericParamList* iEventParamList; |
|
106 /// Own: Connection to server application |
|
107 CPbk2ServerAppConnection* iConnection; |
|
108 /// Own: Configuration IPC package |
|
109 HBufC8* iConfigurationPackage; |
|
110 /// Own: Instructions IPC package |
|
111 HBufC8* iInstructionsPackage; |
|
112 /// Own: Contact view filter buffer |
|
113 HBufC8* iContactViewFilterBuffer; |
|
114 /// Own: Default priorities buffer |
|
115 HBufC8* iDefaultPrioritiesBuffer; |
|
116 }; |
|
117 |
|
118 #endif // CPBK2AIWSELECTIONPROVIDER_H |
|
119 |
|
120 // End of File |