featuremgmt/featuremgr/src/serverexe/featmgrfeatureentry.cpp
changeset 0 08ec8eefde2f
equal deleted inserted replaced
-1:000000000000 0:08ec8eefde2f
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 
       
    17 
       
    18 // INCLUDE FILES
       
    19 #include <s32file.h>
       
    20 #include "featmgrfeatureentry.h"
       
    21 
       
    22 // ============================= LOCAL FUNCTIONS ===============================
       
    23 
       
    24 // ============================ MEMBER FUNCTIONS ===============================
       
    25 
       
    26 // -----------------------------------------------------------------------------
       
    27 // TFeatureServerEntry::TFeatureServerEntry()
       
    28 // -----------------------------------------------------------------------------
       
    29 //
       
    30 TFeatureServerEntry::TFeatureServerEntry() : 
       
    31     iFeatureID( TUid::Uid(0) ), iFlags( 0 ), iData( 0 )
       
    32     {
       
    33 	}
       
    34 
       
    35 // -----------------------------------------------------------------------------
       
    36 // TFeatureServerEntry::TFeatureServerEntry()
       
    37 // -----------------------------------------------------------------------------
       
    38 //
       
    39 TFeatureServerEntry::TFeatureServerEntry( TUid aFeature ) : 
       
    40     iFeatureID( aFeature ), iFlags( 0 ), iData( 0 )
       
    41     {
       
    42     }
       
    43     
       
    44 // -----------------------------------------------------------------------------
       
    45 // TFeatureServerEntry::TFeatureServerEntry()
       
    46 // -----------------------------------------------------------------------------
       
    47 //
       
    48 TFeatureServerEntry::TFeatureServerEntry( TUid aFeature, 
       
    49     TBitFlags32 aFlags, TUint32 aData ) : 
       
    50     iFeatureID( aFeature ), iFlags( aFlags ), iData( aData )
       
    51     {
       
    52     }
       
    53     
       
    54 // -----------------------------------------------------------------------------
       
    55 // TFeatureServerEntry::TFeatureServerEntry()
       
    56 // -----------------------------------------------------------------------------
       
    57 //
       
    58 TFeatureServerEntry::TFeatureServerEntry( TFeatureEntry& aFeature ) : 
       
    59     iFeatureID( aFeature.FeatureUid() ), 
       
    60     iFlags( aFeature.FeatureFlags() ), 
       
    61     iData( aFeature.FeatureData() )
       
    62     {
       
    63     }
       
    64     
       
    65 // -----------------------------------------------------------------------------
       
    66 // TFeatureServerEntry::FeatureUid()
       
    67 // -----------------------------------------------------------------------------
       
    68 //
       
    69 TUid TFeatureServerEntry::FeatureUid() const 
       
    70     {
       
    71     return iFeatureID;
       
    72     }
       
    73 
       
    74 // -----------------------------------------------------------------------------
       
    75 // TFeatureServerEntry::FeatureFlags()
       
    76 // -----------------------------------------------------------------------------
       
    77 //
       
    78 TBitFlags32 TFeatureServerEntry::FeatureFlags() const
       
    79     {
       
    80     return iFlags;
       
    81     }
       
    82     
       
    83 // -----------------------------------------------------------------------------
       
    84 // TFeatureServerEntry::FeatureData()
       
    85 // -----------------------------------------------------------------------------
       
    86 //
       
    87 TUint32 TFeatureServerEntry::FeatureData() const
       
    88     {
       
    89     return iData;
       
    90     }
       
    91     
       
    92 // -----------------------------------------------------------------------------
       
    93 // TFeatureServerEntry::InternalizeL()
       
    94 // -----------------------------------------------------------------------------
       
    95 //
       
    96 void TFeatureServerEntry::InternalizeL( RReadStream& aStream )
       
    97     {
       
    98     iFeatureID = TUid::Uid( aStream.ReadUint32L() );
       
    99     iFlags = aStream.ReadUint32L();
       
   100     iData = aStream.ReadUint32L();
       
   101     }
       
   102     
       
   103 // -----------------------------------------------------------------------------
       
   104 // TFeatureServerEntry::ExternalizeL()
       
   105 // -----------------------------------------------------------------------------
       
   106 //
       
   107 void TFeatureServerEntry::ExternalizeL( RWriteStream& aStream ) const
       
   108     {
       
   109     aStream.WriteUint32L( iFeatureID.iUid );
       
   110     aStream.WriteUint32L( iFlags.iFlags );
       
   111     aStream.WriteUint32L( iData );
       
   112     }
       
   113     
       
   114 //  End of File