2 * Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Phonebook 2 icon identification.
25 // FORWARD DECLARATIONS
26 class TResourceReader;
29 * Phonebook 2 icon identification. This class is responsible for
30 * implementing a unique identifier for icons in the Phonebook
35 public: // Construction
37 * Default C++ constructor.
38 * Constructs a null icon id.
40 IMPORT_C TPbk2IconId();
43 * Constructor that takes the owner uid and icon id.
45 * @param aOwnerUid The UID that specifies whose icon this is.
46 * It's used the identify icons from different
47 * components that are used in the same data
48 * structure. The UID could be e.g a
49 * Phonebook 2 UID for application defined
50 * icons and ECom implementation UID for UI
52 * @param aIconId The id of the icon under the owner.
55 const TUid& aOwnerUid,
59 * Constructor that takes a resource reader that points to a
60 * PHONEBOOK2_ICON_ID structure.
62 * @param aReader Resource reader to a PHONEBOOK2_ICON_ID
66 TResourceReader& aReader );
71 * Comparison that returns ETrue if the icon ids are the same.
73 * @param aRhs An icon id to compare.
74 * @return ETrue if the icon ids are the same.
76 IMPORT_C TBool operator==(
77 const TPbk2IconId& aRhs ) const;
80 * Checks if passed uid is owner of this structure
82 * @param aUid Owner UID to check.
83 * @return ETrue if UID is owner UID, EFalse otherwise.
85 inline TBool IsOwner( const TUid& aUid ) const
86 { return aUid == iOwnersUid; }
89 /// Own: The UID of icon owner
91 /// Own: The id of the icon under the owner
99 #endif // TPBK2ICONID_H