1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/persistentdata/featuremgmt/featuremgr/src/serverexe/featmgrfeatureentry.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,114 @@
1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +
1.20 +
1.21 +// INCLUDE FILES
1.22 +#include <s32file.h>
1.23 +#include "featmgrfeatureentry.h"
1.24 +
1.25 +// ============================= LOCAL FUNCTIONS ===============================
1.26 +
1.27 +// ============================ MEMBER FUNCTIONS ===============================
1.28 +
1.29 +// -----------------------------------------------------------------------------
1.30 +// TFeatureServerEntry::TFeatureServerEntry()
1.31 +// -----------------------------------------------------------------------------
1.32 +//
1.33 +TFeatureServerEntry::TFeatureServerEntry() :
1.34 + iFeatureID( TUid::Uid(0) ), iFlags( 0 ), iData( 0 )
1.35 + {
1.36 + }
1.37 +
1.38 +// -----------------------------------------------------------------------------
1.39 +// TFeatureServerEntry::TFeatureServerEntry()
1.40 +// -----------------------------------------------------------------------------
1.41 +//
1.42 +TFeatureServerEntry::TFeatureServerEntry( TUid aFeature ) :
1.43 + iFeatureID( aFeature ), iFlags( 0 ), iData( 0 )
1.44 + {
1.45 + }
1.46 +
1.47 +// -----------------------------------------------------------------------------
1.48 +// TFeatureServerEntry::TFeatureServerEntry()
1.49 +// -----------------------------------------------------------------------------
1.50 +//
1.51 +TFeatureServerEntry::TFeatureServerEntry( TUid aFeature,
1.52 + TBitFlags32 aFlags, TUint32 aData ) :
1.53 + iFeatureID( aFeature ), iFlags( aFlags ), iData( aData )
1.54 + {
1.55 + }
1.56 +
1.57 +// -----------------------------------------------------------------------------
1.58 +// TFeatureServerEntry::TFeatureServerEntry()
1.59 +// -----------------------------------------------------------------------------
1.60 +//
1.61 +TFeatureServerEntry::TFeatureServerEntry( TFeatureEntry& aFeature ) :
1.62 + iFeatureID( aFeature.FeatureUid() ),
1.63 + iFlags( aFeature.FeatureFlags() ),
1.64 + iData( aFeature.FeatureData() )
1.65 + {
1.66 + }
1.67 +
1.68 +// -----------------------------------------------------------------------------
1.69 +// TFeatureServerEntry::FeatureUid()
1.70 +// -----------------------------------------------------------------------------
1.71 +//
1.72 +TUid TFeatureServerEntry::FeatureUid() const
1.73 + {
1.74 + return iFeatureID;
1.75 + }
1.76 +
1.77 +// -----------------------------------------------------------------------------
1.78 +// TFeatureServerEntry::FeatureFlags()
1.79 +// -----------------------------------------------------------------------------
1.80 +//
1.81 +TBitFlags32 TFeatureServerEntry::FeatureFlags() const
1.82 + {
1.83 + return iFlags;
1.84 + }
1.85 +
1.86 +// -----------------------------------------------------------------------------
1.87 +// TFeatureServerEntry::FeatureData()
1.88 +// -----------------------------------------------------------------------------
1.89 +//
1.90 +TUint32 TFeatureServerEntry::FeatureData() const
1.91 + {
1.92 + return iData;
1.93 + }
1.94 +
1.95 +// -----------------------------------------------------------------------------
1.96 +// TFeatureServerEntry::InternalizeL()
1.97 +// -----------------------------------------------------------------------------
1.98 +//
1.99 +void TFeatureServerEntry::InternalizeL( RReadStream& aStream )
1.100 + {
1.101 + iFeatureID = TUid::Uid( aStream.ReadUint32L() );
1.102 + iFlags = aStream.ReadUint32L();
1.103 + iData = aStream.ReadUint32L();
1.104 + }
1.105 +
1.106 +// -----------------------------------------------------------------------------
1.107 +// TFeatureServerEntry::ExternalizeL()
1.108 +// -----------------------------------------------------------------------------
1.109 +//
1.110 +void TFeatureServerEntry::ExternalizeL( RWriteStream& aStream ) const
1.111 + {
1.112 + aStream.WriteUint32L( iFeatureID.iUid );
1.113 + aStream.WriteUint32L( iFlags.iFlags );
1.114 + aStream.WriteUint32L( iData );
1.115 + }
1.116 +
1.117 +// End of File