browserutilities/favouritesengine/ClientServer/inc/UidMap.h
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     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 the License "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: 
       
    15 *      Declaration of class SUidPair and CUidMap.
       
    16 *      
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef UID_MAP_H
       
    22 #define UID_MAP_H
       
    23 
       
    24 // INCLUDE FILES
       
    25 
       
    26 #include <e32base.h>
       
    27 
       
    28 // CONSTANTS
       
    29 
       
    30 // FORWARD DECLARATION
       
    31 
       
    32 class RWriteStream;
       
    33 class RReadStream;
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /**
       
    38 * Uid mapping.
       
    39 */
       
    40 NONSHARABLE_STRUCT(SUidPair)
       
    41     {
       
    42     public:     // data
       
    43         TInt iUid1; ///< Uid 1.
       
    44         TInt iUid2; ///< Uid 2.
       
    45     };
       
    46 
       
    47 /**
       
    48 * Array of SUidPair-s.
       
    49 */
       
    50 NONSHARABLE_CLASS(CUidMap): public CArrayFixFlat<SUidPair>
       
    51     {
       
    52 
       
    53     public:     // Constructors and destructor
       
    54 
       
    55         /**
       
    56         * Constructor.
       
    57         * @param aGranularity Granularity.
       
    58         */
       
    59         inline CUidMap( TInt aGranularity );
       
    60 
       
    61     public:     // Streaming
       
    62 
       
    63         /**
       
    64         * Externalize into a stream.
       
    65         * @param aStream The stream to externalize to.
       
    66         */
       
    67         void ExternalizeL( RWriteStream& aStream ) const;
       
    68 
       
    69         /**
       
    70         * Internalize from a stream. Existing data is kept, new ones appended.
       
    71         * @param aStream The stream to externalize from.
       
    72         */
       
    73         void InternalizeL( RReadStream& aStream );
       
    74 
       
    75     };
       
    76 
       
    77 #endif
       
    78 
       
    79 #include "UidMap.inl"
       
    80 
       
    81 // End of file