|
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 CFscContactActionPlugin. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_FSCCONTACTACTIONPLUGIN_H |
|
20 #define C_FSCCONTACTACTIONPLUGIN_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 //<cmail> |
|
25 #include "fsccontactactionservicedefines.h" |
|
26 #include "tfsccontactactionpluginparams.h" |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class MFscContactAction; |
|
30 class MFscContactSet; |
|
31 class MFscContactActionPluginObserver; |
|
32 |
|
33 /** |
|
34 * Contact Action Plugin API. |
|
35 * Defines an ECom interface for Contact Action Plugins. |
|
36 * |
|
37 * @since S60 3.1 |
|
38 */ |
|
39 class CFscContactActionPlugin : public CBase |
|
40 { |
|
41 |
|
42 public: // Public constructor and destructor |
|
43 |
|
44 /** |
|
45 * Two-phased constructor. |
|
46 * |
|
47 * @param aPluginUid Implementation uid of plugin to be created |
|
48 * @return New instance of CFscContactActionPlugin |
|
49 */ |
|
50 static inline CFscContactActionPlugin* NewL( |
|
51 TUid aPluginUid, |
|
52 TFscContactActionPluginParams& aParams ); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 virtual ~CFscContactActionPlugin(); |
|
58 |
|
59 public: // Public pure virtual methods |
|
60 |
|
61 /** |
|
62 * Implementation Uid |
|
63 * |
|
64 * @return Implementation Uid of the plugin |
|
65 */ |
|
66 virtual TUid Uid() const = 0; |
|
67 |
|
68 /** |
|
69 * Action List |
|
70 * |
|
71 * @return a const pointer to a array contaning uids of implemented actions |
|
72 */ |
|
73 virtual const CArrayFix<TUid>* ActionList() const = 0; |
|
74 |
|
75 /** |
|
76 * Get Action |
|
77 * Method returns a reference to requested action or |
|
78 * leaves with KErrNotFound error code if action is not found. |
|
79 * |
|
80 * @param aActionUid Action uid |
|
81 * @return Reference to requested action. |
|
82 */ |
|
83 virtual const MFscContactAction& GetActionL( |
|
84 TUid aActionUid ) const = 0; |
|
85 |
|
86 /** |
|
87 * Method for quering action's priority and visibility in current context with given contacts |
|
88 * |
|
89 * @param aActionUid Action uid |
|
90 * @param aContactSet Target contact set |
|
91 * @param aGroupList List containing target groups and their contacts |
|
92 * @param aActionMenuVisibility Action's visibility in action menu. |
|
93 * Visibility information is updated by the method. |
|
94 * @param aOptionsMenuVisibility Action's visibility in options menu |
|
95 * Visibility information is updated by the method. |
|
96 * @return Priority of the action |
|
97 */ |
|
98 virtual void PriorityForContactSetL( |
|
99 TUid aActionUid, |
|
100 MFscContactSet& aContactSet, |
|
101 TFscContactActionVisibility& aActionMenuVisibility, |
|
102 TFscContactActionVisibility& aOptionsMenuVisibility, |
|
103 MFscContactActionPluginObserver* aObserver ) = 0; |
|
104 |
|
105 /** |
|
106 * Cancels async method PriorityForContactSetL. |
|
107 */ |
|
108 virtual void CancelPriorityForContactSet() = 0; |
|
109 |
|
110 /** |
|
111 * Execute action. Asynchronous method. |
|
112 * |
|
113 * @param aActionUid Action uid of the action to be executed. |
|
114 * @param aContactSet Target contact set. |
|
115 * @param aObserver operation observer. |
|
116 */ |
|
117 virtual void ExecuteL( |
|
118 TUid aActionUid, |
|
119 MFscContactSet& aContactSet, |
|
120 MFscContactActionPluginObserver* aObserver ) = 0; |
|
121 |
|
122 /** |
|
123 * Cancels async method ExecuteL. |
|
124 */ |
|
125 virtual void CancelExecute() = 0; |
|
126 |
|
127 protected: // protected data |
|
128 |
|
129 private: // data |
|
130 |
|
131 /** iDtor_ID_Key Instance identifier key. When instance of an |
|
132 * implementation is created by ECOM framework, the |
|
133 * framework will assign UID for it. The UID is used in |
|
134 * destructor to notify framework that this instance is |
|
135 * being destroyed and resources can be released. |
|
136 */ |
|
137 TUid iDtor_ID_Key; |
|
138 |
|
139 }; |
|
140 |
|
141 #include "cfsccontactactionplugin.inl" |
|
142 //</cmail> |
|
143 |
|
144 #endif // C_FSCCONTACTACTIONPLUGIN_H |