|
1 /* |
|
2 * Copyright (c) 2004 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: Utils for IM modules. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __CCAPCUTILS_H__ |
|
20 #define __CCAPCUTILS_H__ |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <s32strm.h> |
|
24 #include <badesca.h> |
|
25 |
|
26 // FORWARD CLASS DECLERATIONS |
|
27 class MCAStoredContact; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * Utils for IM modules. |
|
33 * |
|
34 * @lib CAEngine.dll |
|
35 * @since 3.0 |
|
36 */ |
|
37 class CCAPCUtils // CSI: 51 # This is not a C-class although it begins with CA |
|
38 { |
|
39 public: // new methods |
|
40 |
|
41 /** |
|
42 * Process userid/groupid/listid so that the "wv:" part is hidden, |
|
43 * depending on the branded setting coming from the UI. |
|
44 * @param aId The id to process |
|
45 * @return The id with the "wv:" (userid, groupid) or "wv:user" (listid) |
|
46 * part hidden |
|
47 */ |
|
48 IMPORT_C static TPtrC DisplayId( const TDesC& aId, TBool aListHiding = EFalse ); |
|
49 |
|
50 /** |
|
51 * Combines the descriptors in given array to one descriptor. |
|
52 * Ownership is transferred to caller! |
|
53 * The items are separated with KSpace. |
|
54 * @since |
|
55 * @param aArray Array of descriptors to be combined |
|
56 * @param aDisplayId Set this to ETrue if the user ids are displayed on UI. |
|
57 * Strips off the "WV:" part from ids. |
|
58 * @return Buffer containing the combined descriptors |
|
59 * separated with KSpace |
|
60 */ |
|
61 IMPORT_C static HBufC* CreateBufLC( const CDesCArray& aArray, TBool aDisplayId = EFalse ); |
|
62 |
|
63 /** |
|
64 * Handles partial successful errors |
|
65 * @return count of partial success errors |
|
66 * @since 3.2 |
|
67 */ |
|
68 |
|
69 IMPORT_C static TInt PartialSucessCountL(); |
|
70 |
|
71 /** |
|
72 * Handles partial successful errors |
|
73 * @return correct error code |
|
74 * @since 3.2 |
|
75 */ |
|
76 |
|
77 IMPORT_C static TInt GetErrorCodeL( TInt aIndex ); |
|
78 |
|
79 /** |
|
80 * Modifies aArray so that it does not contain duplicate user ids. |
|
81 * @since series 60 v3.2 |
|
82 * @param aArray Array of MCAStoredContacts to be modified. |
|
83 */ |
|
84 IMPORT_C static void RemoveDuplicateWVIds( CDesCArray& aArray ); |
|
85 |
|
86 private: // Data |
|
87 |
|
88 // Error data holder |
|
89 RPointerArray<TInt> iErrorData; |
|
90 |
|
91 }; |
|
92 |
|
93 #endif // __CCAPCUTILS_H__ |
|
94 |
|
95 // End of File |