|
1 /* |
|
2 * Copyright (c) 2002 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: Process Component Interface for Blocking and Unblocking |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MCABLOCKINGPC_H |
|
20 #define MCABLOCKINGPC_H |
|
21 |
|
22 |
|
23 //includes |
|
24 |
|
25 //Calss declarations |
|
26 class MCAServerContactsArrayPC; |
|
27 class MCABlockingBackgroundObserverPC; |
|
28 |
|
29 class MCABlockingPC |
|
30 { |
|
31 |
|
32 public: |
|
33 /** |
|
34 * Gets the backgroundstatus |
|
35 *@returns the TCABackgroundStatus |
|
36 */ |
|
37 virtual TInt GetBackgroundStatus( ) = 0; |
|
38 |
|
39 /** |
|
40 * Gets the blockedlist from server |
|
41 *@returns the |
|
42 */ |
|
43 virtual TInt GetBlockedListFromServerL() = 0; |
|
44 |
|
45 /** |
|
46 * Gets the retrieved blocked list |
|
47 * @return the blocked array |
|
48 */ |
|
49 virtual const CDesCArray* GetBlockedList() = 0; |
|
50 |
|
51 /** |
|
52 * Remove user from blocked or granted list. |
|
53 * @param aBlockList blocked to be removed entity's list. |
|
54 * @return error code. |
|
55 */ |
|
56 virtual TInt RemoveL( const CDesCArray* aUnBlockList, |
|
57 const CDesCArray* aGrantList /*=NULL*/ ) = 0; |
|
58 |
|
59 /** |
|
60 * Insert users to be blocked or granted. |
|
61 * @param aBlockList blocked entity's list. |
|
62 * @param aGrantList granted entity's list. |
|
63 * @return error code. |
|
64 */ |
|
65 virtual TInt InsertL( const CDesCArray* aUnBlockList, |
|
66 const CDesCArray* aGrantList ) = 0; |
|
67 |
|
68 |
|
69 /** |
|
70 *Gets the list of blockedmembers |
|
71 */ |
|
72 virtual void GetBlockedMembersL( |
|
73 const TDesC& aIcon ) = 0; |
|
74 |
|
75 |
|
76 /** |
|
77 * Gets the reference of ServerContactsArray |
|
78 */ |
|
79 virtual MCAServerContactsArrayPC& GetServerContactsArray() = 0; |
|
80 |
|
81 /** |
|
82 * Gets blocked members from Blocking interface and |
|
83 * fetch nicknames also |
|
84 * for contact ID's from Storage. |
|
85 * @param aIcon Icon to be inserted in front of |
|
86 * each list item (e.g "1\t") |
|
87 * @return contacts array with wvid's and nicknames |
|
88 */ |
|
89 virtual MCAServerContactsArrayPC* GetBlockedMembersLC( |
|
90 const TDesC& aIcon ) = 0; |
|
91 |
|
92 /** |
|
93 * Gets the list to be unblocked |
|
94 * @Param aSelectedItem - selected index |
|
95 * @param aFindTxt - Find Pane Text |
|
96 */ |
|
97 virtual CDesCArrayFlat* GetUnBlockListL( TInt aSelectedItem, |
|
98 const TDesC& aFindTxt ) = 0; |
|
99 |
|
100 /** |
|
101 * GetWvId: gets the Wvid od a given index. |
|
102 */ |
|
103 virtual TPtrC GetWvIdL( const TDesC& aIcon, |
|
104 TInt aDeletedIndex ) = 0; |
|
105 |
|
106 |
|
107 /** |
|
108 * RegisterBackgroundObserver to register for background handling |
|
109 */ |
|
110 virtual void RegisterBackgroundObserver( |
|
111 MCABlockingBackgroundObserverPC* |
|
112 aBackgroundObserver ) = 0; |
|
113 /** |
|
114 * UnRegisterBackgroundObserver to unregister for background handling |
|
115 */ |
|
116 virtual void UnRegisterBackgroundObserver( ) = 0; |
|
117 |
|
118 /** |
|
119 * DeleteContactL: Deletes a contact |
|
120 * @Param aWvId: WVID of the contact to be deleted |
|
121 * @Param aFindTxt : Find Pane Text |
|
122 */ |
|
123 virtual TInt DeleteContactL( TInt aSelectedItem, |
|
124 const TDesC& aFindTxt ) = 0; |
|
125 |
|
126 /** |
|
127 * RemoveIDsL: removes the list of userids to be unblocked |
|
128 * @Param aUserIds: list of userids |
|
129 */ |
|
130 virtual void RemoveIDsL( const CDesCArray* aUserIds ) = 0; |
|
131 |
|
132 |
|
133 /** |
|
134 * Is this contact in our block list or not? |
|
135 * @param aContact specifies the contact. |
|
136 * @return ETrue if yes EFalse if not. |
|
137 */ |
|
138 virtual TBool IsContactBlocked( const TDesC& aContact, |
|
139 TBool aUseGrant = EFalse ) const = 0; |
|
140 |
|
141 |
|
142 /** |
|
143 * Set temporary grant on/off. If contact is blocked, unblock is permanent. |
|
144 * @since 3.2 |
|
145 * @param aContact specifies the contact |
|
146 * @param aOn On/off. ETrue = on |
|
147 * @return errorCode if unsuccessfull |
|
148 */ |
|
149 virtual TInt SetTemporaryGrantL( |
|
150 const TDesC& aContact, TBool aOn ) = 0; |
|
151 |
|
152 public: |
|
153 /** |
|
154 *virtual Destructor |
|
155 */ |
|
156 virtual ~MCABlockingPC() {}; |
|
157 |
|
158 }; |
|
159 #endif //end of file |