|
1 /* |
|
2 * Copyright (c) 2005 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: Contact Ids handling tools |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __PENGCONTACTIDTOOLS_H__ |
|
19 #define __PENGCONTACTIDTOOLS_H__ |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32base.h> |
|
23 #include <badesca.h> |
|
24 |
|
25 /** |
|
26 * Find Contact Id in the aray |
|
27 * |
|
28 * @since 3.0 |
|
29 * @param aArray Contact ids array |
|
30 * @param aId Contact id to look for |
|
31 * @return KErrNotFound if it is not found otherwise index in array |
|
32 */ |
|
33 GLREF_C TInt FindContactIdInArray( |
|
34 const MDesCArray& aArray, |
|
35 const TDesC& aId ); |
|
36 |
|
37 /** |
|
38 * Add contact Id to the array of the contact Ids |
|
39 * |
|
40 * @since 3.0 |
|
41 * @param aArray array of contact ids |
|
42 * @param aId Contact id to look for |
|
43 * @return index of the added element in array, or KErrAlreadyExists |
|
44 */ |
|
45 GLREF_C TInt AddContactIdToArrayL( CDesCArray& aArray, |
|
46 const TDesC& aId ); |
|
47 |
|
48 /** |
|
49 * Compare two contact Ids |
|
50 * |
|
51 * @since 3.0 |
|
52 * @param aId1 presence Id1 |
|
53 * @param aId2 presence Id2 |
|
54 * @param aUserDomain user domain |
|
55 * @return KErrNone if they are same, other non zero number if not |
|
56 */ |
|
57 GLREF_C TInt CompareContactIds( const TDesC& aId1, |
|
58 const TDesC& aId2 ); |
|
59 |
|
60 |
|
61 #endif // __PENGCONTACTIDTOOLS_H__ |
|
62 |
|
63 // End of File |
|
64 |