1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/persistentdata/featuremgmt/featuremgr/src/serverexe/featmgrfeatureentry.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,137 @@
1.4 +/*
1.5 +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +
1.23 +#ifndef FEATMGRFEATUREENTRY_H
1.24 +#define FEATMGRFEATUREENTRY_H
1.25 +
1.26 +#include <e32cmn.h>
1.27 +#include <featmgr/featurecmn.h>
1.28 +
1.29 +class RReadStream;
1.30 +class RWriteStream;
1.31 +
1.32 +
1.33 +/**
1.34 +An enumeration for accessing internal feature status flags bits 24..31 used
1.35 +inside the server. See TFeatureFlags in published header featurecmn.h for the
1.36 +flag definitions 0..23.
1.37 +
1.38 +@see TFeatureFlags
1.39 +@see TBitFlagsT
1.40 +@internalComponent
1.41 +*/
1.42 +enum TFeatureFlagsServer
1.43 + {
1.44 + // Do not define flags here for values 0..23. See TFeatureFlags enum.
1.45 +
1.46 + /** If set, the feature flag is a Runtime feature flag (created at run time).
1.47 + if not set means source of feature flag is ROM or plug-in */
1.48 + EFeatureRuntime = 24,
1.49 +
1.50 + // Reserved flags, these are not currently used in the server
1.51 + EFeatureFlagUnused25 = 25,
1.52 + EFeatureFlagUnused26 = 26,
1.53 + EFeatureFlagUnused27 = 27,
1.54 + EFeatureFlagUnused28 = 28,
1.55 + EFeatureFlagUnused29 = 29,
1.56 + EFeatureFlagUnused30 = 30,
1.57 + EFeatureFlagUnused31 = 31
1.58 + };
1.59 +
1.60 +
1.61 +// CLASS DECLARATION
1.62 +// @see corresponding client side class TFeatureEntry
1.63 +
1.64 +class TFeatureServerEntry
1.65 + {
1.66 + public:
1.67 +
1.68 + /**
1.69 + * Constructors.
1.70 + */
1.71 + TFeatureServerEntry();
1.72 + TFeatureServerEntry( TUid aFeature );
1.73 + TFeatureServerEntry( TUid aFeature, TBitFlags32 aFlags, TUint32 aData );
1.74 + TFeatureServerEntry( TFeatureEntry& aEntry );
1.75 +
1.76 + /**
1.77 + * Returns feature status flags.
1.78 + */
1.79 + TBitFlags32 FeatureFlags() const;
1.80 +
1.81 + /**
1.82 + * Returns feature data.
1.83 + */
1.84 + TUint32 FeatureData() const;
1.85 +
1.86 + /**
1.87 + * Returns feature UID.
1.88 + */
1.89 + TUid FeatureUid() const;
1.90 +
1.91 + /**
1.92 + * Internalize object from stream
1.93 + */
1.94 + void InternalizeL( RReadStream& aStream );
1.95 +
1.96 + /**
1.97 + * Externalize object from stream
1.98 + */
1.99 + void ExternalizeL( RWriteStream& aStream ) const;
1.100 +
1.101 + /**
1.102 + *This sets a feature's flags and data
1.103 + */
1.104 + void inline Set( TFeatureServerEntry aEntry)
1.105 + {
1.106 + iFlags = aEntry.FeatureFlags();
1.107 + iData = aEntry.FeatureData();
1.108 + }
1.109 +
1.110 + /**
1.111 + *This sets a feature's flags and data
1.112 + */
1.113 + void inline Set(TBitFlags32 aFlags, TUint32 aData)
1.114 + {
1.115 + iFlags = aFlags;
1.116 + iData = aData;
1.117 + }
1.118 +
1.119 + private:
1.120 +
1.121 + /** UID of the feature. */
1.122 + TUid iFeatureID;
1.123 +
1.124 + /** Value of the feature status flags.
1.125 + @see TFeatureFlags
1.126 + @see TFeatureFlagsServer */
1.127 + TBitFlags32 iFlags;
1.128 +
1.129 + /** Data associated with feature. */
1.130 + TUint32 iData;
1.131 + };
1.132 +
1.133 +/**
1.134 +* Defines TFeatureEntry array.
1.135 +*/
1.136 +typedef RArray<TFeatureServerEntry> RFeatureServerArray;
1.137 +
1.138 +#endif // FEATMGRFEATUREENTRY_H
1.139 +
1.140 +// End of File