diff -r 000000000000 -r f72a12da539e idlehomescreen/inc/mxncomponentinterface.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/idlehomescreen/inc/mxncomponentinterface.h Thu Dec 17 08:40:49 2009 +0200 @@ -0,0 +1,51 @@ +/* +* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Base interface for component data APIs +* +*/ + + +#ifndef __MXNCOMPONENTINTERFACE_H__ +#define __MXNCOMPONENTINTERFACE_H__ + +// INCLUDES +#include +#include "xnnodeappif.h" + +// CLASS DECLARATION +/** +* Base interface for component data APIs +* @lib xnlayoutengine.lib +* @since Series 60 3.1 +*/ +namespace XnComponentInterface + { + _LIT8(KType, ""); + + class MXnComponentInterface + { + public: + static inline const TDesC8& Type() + { + return KType; + } + }; + + template TBool MakeInterfaceL(T*& aTargetInterface, CXnNodeAppIf& aNode) + { + aTargetInterface = static_cast(aNode.MakeInterfaceL(T::Type())); + return aTargetInterface ? ETrue : EFalse; + } + } +#endif //__MXNCOMPONENTINTERFACE_H__