|
1 /* |
|
2 * Copyright (c) 2008 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: Declaration of class CFscContactActionService. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_FSCCONTACTACTIONSERVICE_H |
|
20 #define C_FSCCONTACTACTIONSERVICE_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 #include "fsccontactactionservicedefines.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CVPbkContactManager; |
|
28 class MFscContactAction; |
|
29 class MFscContactLinkIterator; |
|
30 class MFscContactActionServiceObserver; |
|
31 |
|
32 /** |
|
33 * Contact Action Service API. |
|
34 * Defines an ECom interface for the Contact Action Service. |
|
35 * |
|
36 * @since S60 3.1 |
|
37 */ |
|
38 class CFscContactActionService : public CBase |
|
39 { |
|
40 |
|
41 public: // Public constructor and destructor |
|
42 |
|
43 /** |
|
44 * Two-phased constructor. |
|
45 * |
|
46 * @return Pointer to new instance of CFscContactActionService |
|
47 */ |
|
48 static inline CFscContactActionService* NewL( |
|
49 CVPbkContactManager& aContactManager ); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 virtual ~CFscContactActionService(); |
|
55 |
|
56 public: // Public methods |
|
57 |
|
58 /** |
|
59 * Method for setting current contact set to the service. |
|
60 * |
|
61 * @param aIterator iterator to collection of MVPbkContactLink objects. |
|
62 * Collection can contain links to contacts and group. |
|
63 */ |
|
64 virtual void SetContactSetL( MFscContactLinkIterator* aIterator ) = 0; |
|
65 |
|
66 /** |
|
67 * Method for setting current contact set to the service. |
|
68 * |
|
69 * @param aStoreContactList collection of MVPbkStoreContact objects. |
|
70 * Collection can contain ONLY contacts |
|
71 * (no groups). |
|
72 */ |
|
73 virtual void SetContactSetL( |
|
74 const RFscStoreContactList& aStoreContactList ) = 0; |
|
75 |
|
76 /** |
|
77 * Method for quering available actions |
|
78 * Method searches actions for pre-set contact/group set. |
|
79 * Results can be received with QueryResults method. |
|
80 * Asynchronous. Data is ready when observer's QueryActionsComplete |
|
81 * method is invoked. |
|
82 * |
|
83 * @param aObsever operation observer. |
|
84 * @param aStopWhenOneActionFound stops query when at least one |
|
85 * action found. |
|
86 * @param aActionTypeFlags Action type flags which are used to filter |
|
87 * actions. |
|
88 * @param aMinPriority Minimum allowed priority for returned actions. |
|
89 */ |
|
90 virtual void QueryActionsL( |
|
91 MFscContactActionServiceObserver* aObserver, |
|
92 TBool aStopWhenOneActionFound = EFalse, |
|
93 TUint64 aActionTypeFlags = KFscAtDefault, |
|
94 TInt aMinPriority = 0 ) = 0; |
|
95 |
|
96 /** |
|
97 * Method for quering all actions from existing action plugins. |
|
98 * Unlike QueryActionsL, this doesn't consider contact data but |
|
99 * just returns all actions. |
|
100 * |
|
101 * @param aActionTypeFlags Action type flags which are used to filter |
|
102 * actions. Use value KFscAtAll to get all. |
|
103 */ |
|
104 virtual const CFscContactActionList& AllActionsListL(TUint64 aActionTypeFlags) const = 0; |
|
105 |
|
106 /** |
|
107 * Cancels async method QueryActionsL. |
|
108 */ |
|
109 virtual void CancelQueryActions() = 0; |
|
110 |
|
111 /** |
|
112 * Return action query results. |
|
113 * Empty list is returned if no queries has been done |
|
114 * |
|
115 * @return action query result list |
|
116 */ |
|
117 virtual const CFscContactActionList& QueryResults() const = 0; |
|
118 |
|
119 /** |
|
120 * Execute action. |
|
121 * Asynchronous. Data is ready when observer's ExecuteComplete |
|
122 * mthod is invoked. |
|
123 * |
|
124 * @param aActionUid uid of action to be executed |
|
125 */ |
|
126 virtual void ExecuteL( |
|
127 TUid aActionUid, |
|
128 MFscContactActionServiceObserver* aObserver ) = 0; |
|
129 |
|
130 /** |
|
131 * Cancels async method ExecuteL. |
|
132 */ |
|
133 virtual void CancelExecute() = 0; |
|
134 |
|
135 private: // data |
|
136 |
|
137 /** iDtor_ID_Key Instance identifier key. When instance of an |
|
138 * implementation is created by ECOM framework, the |
|
139 * framework will assign UID for it. The UID is used in |
|
140 * destructor to notify framework that this instance is |
|
141 * being destroyed and resources can be released. |
|
142 */ |
|
143 TUid iDtor_ID_Key; |
|
144 |
|
145 }; |
|
146 |
|
147 /** |
|
148 * Construction parameters for Action Menu |
|
149 * |
|
150 * @since S60 3.1 |
|
151 */ |
|
152 class TFscContactActionServiceConstructParameters |
|
153 { |
|
154 |
|
155 public: // Public methods |
|
156 |
|
157 /** |
|
158 * Constructor |
|
159 * |
|
160 * @param aService Pointer to Contact Action Service |
|
161 * @param aMode Menu mode |
|
162 */ |
|
163 TFscContactActionServiceConstructParameters( |
|
164 CVPbkContactManager& aVPbkContactManager ) |
|
165 : iVPbkContactManager( aVPbkContactManager ) {} |
|
166 |
|
167 public: // Public members |
|
168 |
|
169 /** |
|
170 * Reference to virtual phonebook contact manager. |
|
171 */ |
|
172 CVPbkContactManager& iVPbkContactManager; |
|
173 |
|
174 }; |
|
175 |
|
176 #include "cfsccontactactionservice.inl" |
|
177 |
|
178 #endif // C_FSCCONTACTACTIONSERVICE_H |