epoc32/include/app/TPbk2IconId.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@4
     1
/*
williamr@4
     2
* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
williamr@4
     3
* All rights reserved.
williamr@4
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of "Eclipse Public License v1.0"
williamr@4
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@4
     8
*
williamr@4
     9
* Initial Contributors:
williamr@4
    10
* Nokia Corporation - initial contribution.
williamr@4
    11
*
williamr@4
    12
* Contributors:
williamr@4
    13
*
williamr@4
    14
* Description:  Phonebook 2 icon identification.
williamr@4
    15
*
williamr@4
    16
*/
williamr@4
    17
williamr@4
    18
williamr@4
    19
#ifndef TPBK2ICONID_H
williamr@4
    20
#define TPBK2ICONID_H
williamr@4
    21
williamr@4
    22
// INCLUDE FILES
williamr@4
    23
#include <e32std.h>
williamr@4
    24
williamr@4
    25
// FORWARD DECLARATIONS
williamr@4
    26
class TResourceReader;
williamr@4
    27
williamr@4
    28
/**
williamr@4
    29
 * Phonebook 2 icon identification. This class is responsible for
williamr@4
    30
 * implementing a unique identifier for icons in the Phonebook
williamr@4
    31
 * context.
williamr@4
    32
 */
williamr@4
    33
class TPbk2IconId
williamr@4
    34
    {
williamr@4
    35
    public: // Construction
williamr@4
    36
        /**
williamr@4
    37
         * Default C++ constructor.
williamr@4
    38
         * Constructs a null icon id.
williamr@4
    39
         */
williamr@4
    40
        IMPORT_C TPbk2IconId();
williamr@4
    41
williamr@4
    42
        /**
williamr@4
    43
         * Constructor that takes the owner uid and icon id.
williamr@4
    44
         *
williamr@4
    45
         * @param aOwnerUid     The UID that specifies whose icon this is.
williamr@4
    46
         *                      It's used the identify icons from different
williamr@4
    47
         *                      components that are used in the same data
williamr@4
    48
         *                      structure. The UID could be e.g a
williamr@4
    49
         *                      Phonebook 2 UID for application defined
williamr@4
    50
         *                      icons and ECom implementation UID for UI
williamr@4
    51
         *                      extension icons.
williamr@4
    52
         * @param aIconId       The id of the icon under the owner.
williamr@4
    53
         */
williamr@4
    54
        IMPORT_C TPbk2IconId(
williamr@4
    55
                const TUid& aOwnerUid,
williamr@4
    56
                TInt aIconId );
williamr@4
    57
williamr@4
    58
        /**
williamr@4
    59
         * Constructor that takes a resource reader that points to a
williamr@4
    60
         * PHONEBOOK2_ICON_ID structure.
williamr@4
    61
         *
williamr@4
    62
         * @param aReader   Resource reader to a PHONEBOOK2_ICON_ID
williamr@4
    63
         *                  resource structure.
williamr@4
    64
         */
williamr@4
    65
        IMPORT_C TPbk2IconId(
williamr@4
    66
                    TResourceReader& aReader );
williamr@4
    67
williamr@4
    68
    public: // Interface
williamr@4
    69
williamr@4
    70
        /**
williamr@4
    71
         * Comparison that returns ETrue if the icon ids are the same.
williamr@4
    72
         *
williamr@4
    73
         * @param aRhs      An icon id to compare.
williamr@4
    74
         * @return  ETrue if the icon ids are the same.
williamr@4
    75
         */
williamr@4
    76
        IMPORT_C TBool operator==(
williamr@4
    77
                const TPbk2IconId& aRhs ) const;
williamr@4
    78
williamr@4
    79
        /**
williamr@4
    80
         * Checks if passed uid is owner of this structure
williamr@4
    81
         *
williamr@4
    82
         * @param aUid Owner UID to check.
williamr@4
    83
         * @return ETrue if UID is owner UID, EFalse otherwise.
williamr@4
    84
         */
williamr@4
    85
        inline TBool IsOwner( const TUid& aUid ) const
williamr@4
    86
                { return aUid == iOwnersUid; }
williamr@4
    87
williamr@4
    88
    private: // Data
williamr@4
    89
        /// Own: The UID of icon owner
williamr@4
    90
        TUid iOwnersUid;
williamr@4
    91
        /// Own: The id of the icon under the owner
williamr@4
    92
        TInt iIconId;
williamr@4
    93
        /// Own: Spare data
williamr@4
    94
        TInt32 iSpare1;
williamr@4
    95
        /// Own: Spare data
williamr@4
    96
        TInt32 iSpare2;
williamr@4
    97
    };
williamr@4
    98
williamr@4
    99
#endif // TPBK2ICONID_H
williamr@4
   100
williamr@4
   101
// End of File