Update contrib.
1 // Copyright (c) 2005-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
26 #include <mmf/server/taskconfig.h>
28 const TInt KUidTTaskConfig = 0x102737DF;
29 const TInt KUidTTaskConfig2 = 0x10273822 ;
30 const TInt KUidPCMConfig = 0x102737E0;
33 Configuration structure base class.
34 Represents a configuration structure identified by a base class.
39 inline TUid Uid() const;
46 Template class to create a TPuConfig configuration given a structure and an unique UID to identify it.
48 template<int U , class T>
49 class TPuConfigParam : public TPuConfig
52 TPuConfigParam(const T& aParameterStructure);
55 static const T* GetStructure(const TPuConfig& aConfig);
56 static T* GetStructure(TPuConfig& aConfig);
63 @param aParameterStructure The structure to store
65 template <int U, class T>
66 TPuConfigParam<U,T>::TPuConfigParam(const T& aParameterStructure)
69 iBuf = TPckgBuf<T>(aParameterStructure);
72 template <int U, class T>
73 TPuConfigParam<U,T>::TPuConfigParam()
79 Operator to return the structure represented by the class.
80 @return The structure represented by the class.
82 template <int U, class T>
83 TPuConfigParam<U,T>::operator T&()
89 Static method to return the structure represented by TPuConfig.
90 @param A const reference to the base structure.
91 @return A const pointer to the structure represented by the class.
93 template <int U, class T>
94 const T* TPuConfigParam<U,T>::GetStructure(const TPuConfig& aConfig)
96 const T* ptr = &((static_cast<const TPuConfigParam<U,T>& >(aConfig)).iBuf());
101 Static method to return the structure represented by TPuConfig.
102 @param A reference to the base structure.
103 @return A pointer to the structure represented by the class.
105 template <int U, class T>
106 T* TPuConfigParam<U,T>::GetStructure(TPuConfig& aConfig)
108 T* ptr = &((static_cast<TPuConfigParam<U,T>& >(aConfig)).iBuf());
133 Little endian data, (LSB to MSB)
137 Big endian data. (MSB to LSB)
142 typedef TPuConfigParam<KUidTTaskConfig, TTaskConfig> TPuTaskConfig;
143 typedef TPuConfigParam<KUidTTaskConfig2, TTaskConfig2> TPuTaskConfig2;
145 #include <mdf/mdfpuconfig.inl>
147 #endif // MDFPUCONFIG_H