|
1 /* |
|
2 * Copyright (c) 2006-2007 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: A class for icon identification |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <TPbk2IconId.h> |
|
20 #include <Pbk2IconId.hrh> |
|
21 #include <barsread.h> |
|
22 |
|
23 // ======== MEMBER FUNCTIONS ======== |
|
24 |
|
25 // --------------------------------------------------------------------------- |
|
26 // TPbk2IconId::TPbk2IconId |
|
27 // --------------------------------------------------------------------------- |
|
28 // |
|
29 EXPORT_C TPbk2IconId::TPbk2IconId() : |
|
30 iOwnersUid( TUid::Uid( KPbk2NullIconIdOwnerUid )), |
|
31 iIconId( EPbk2NullIconId ) |
|
32 { |
|
33 } |
|
34 |
|
35 // --------------------------------------------------------------------------- |
|
36 // TPbk2IconId::TPbk2IconId |
|
37 // --------------------------------------------------------------------------- |
|
38 // |
|
39 EXPORT_C TPbk2IconId::TPbk2IconId( |
|
40 const TUid& aOwnerUid, |
|
41 TInt aIconId ) : |
|
42 iOwnersUid( aOwnerUid ), |
|
43 iIconId( aIconId ) |
|
44 { |
|
45 } |
|
46 |
|
47 // --------------------------------------------------------------------------- |
|
48 // TPbk2IconId::TPbk2IconId |
|
49 // --------------------------------------------------------------------------- |
|
50 // |
|
51 EXPORT_C TPbk2IconId::TPbk2IconId( |
|
52 TResourceReader& aReader ) |
|
53 { |
|
54 iOwnersUid = TUid::Uid( aReader.ReadInt32() ); |
|
55 iIconId = aReader.ReadInt8(); |
|
56 } |
|
57 |
|
58 // --------------------------------------------------------------------------- |
|
59 // TPbk2IconId::IsSame |
|
60 // --------------------------------------------------------------------------- |
|
61 // |
|
62 EXPORT_C TBool TPbk2IconId::operator==( |
|
63 const TPbk2IconId& aRhs ) const |
|
64 { |
|
65 if ( iOwnersUid == aRhs.iOwnersUid ) |
|
66 { |
|
67 return iIconId == aRhs.iIconId; |
|
68 } |
|
69 return EFalse; |
|
70 } |
|
71 |
|
72 // end of file |