omxil/mmilapi/ilif/inc/tilstruct.h
changeset 56 b6488ac24ddc
parent 47 481b3bce574a
child 57 1cbb0d5bf7f2
equal deleted inserted replaced
47:481b3bce574a 56:b6488ac24ddc
     1 // Copyright (c) 2008-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  @file
       
    18  @internalTechnology
       
    19  @prototype
       
    20 */
       
    21 
       
    22 #ifndef TILSTRUCT_H
       
    23 #define TILSTRUCT_H
       
    24 
       
    25 #include <e32base.h>
       
    26 
       
    27 /**
       
    28 Configuration structure base class. 
       
    29 Represents a configuration structure identified by a base class.
       
    30 */
       
    31 class TILStruct
       
    32 	{
       
    33 public:
       
    34 	inline const TUid& Uid() const;
       
    35 
       
    36 protected:
       
    37 	inline TILStruct();
       
    38 
       
    39 protected:
       
    40 	TUid iUid;
       
    41 	};
       
    42 
       
    43 /**
       
    44 Template class to create a TILStruct configuration given a structure and an unique UID to identify it.
       
    45 */
       
    46 template<TInt32 U , class T>
       
    47 class TILStructParam : public TILStruct
       
    48 	{
       
    49 public:
       
    50 	inline TILStructParam(const T& aParameterStructure);
       
    51 	inline TILStructParam();
       
    52 	inline operator T&();
       
    53 	inline static const T* GetStructure(const TILStruct& aConfig);	
       
    54 	inline static T* GetStructure(TILStruct& aConfig);	
       
    55 private:
       
    56 	TPckgBuf<T> iBuf;
       
    57 	};
       
    58 
       
    59 #include "tilstruct.inl"
       
    60 
       
    61 #endif  // TILSTRUCT_H