diff -r 000000000000 -r 5f000ab63145 phoneengine/PhoneCntFinder/inc/CPhoneCntNumberParser.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phoneengine/PhoneCntFinder/inc/CPhoneCntNumberParser.h Mon Jan 18 20:18:27 2010 +0200 @@ -0,0 +1,109 @@ +/* +* Copyright (c) 2004-2006 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: This class loads contact model phone number parser DLL. +* +*/ + + +#ifndef CCntNumberParser_H +#define CCntNumberParser_H + +// INCLUDES +#include +#include + +// FORWARD DECLARATIONS +class CContactPhoneNumberParser; + +// CLASS DECLARATION + +/** + * Template classes to call ResetAndDestroy on array classes + * automatically, when ::PopAndDestroy'ing from the cleanup stack. + */ +template +class CleanupResetAndDestroy + { +public: + inline static void PushL(T& aRef); +private: + static void ResetAndDestroy(TAny *aPtr); + }; +template +inline void CleanupResetAndDestroyL(T& aRef); + +// Template class CleanupClose +template +inline void CleanupResetAndDestroy::PushL(T& aRef) + {CleanupStack::PushL(TCleanupItem(&ResetAndDestroy, &aRef));} +template +void CleanupResetAndDestroy::ResetAndDestroy(TAny *aPtr) + {static_cast(aPtr)->ResetAndDestroy();} +template +inline void CleanupResetAndDestroyPushL(T& aRef) + {CleanupResetAndDestroy::PushL(aRef);} + + +/** +* CCntNumberParser +* +* This class loads contact model phone number parser DLL. +* +* @lib PhoneCntFinder +* @since 2.8 +*/ +NONSHARABLE_CLASS( CCntNumberParser ) : public CBase + { + public: // Constructor + + /** + * Two-phased constructor. + * @return New instance + */ + static CCntNumberParser* NewL(); + + /** + * Destructor. + */ + ~CCntNumberParser(); + + /** + * Gets a pointer of CContactPhoneNumberParser instance. + * + * @return the pointer of the instance. + */ + CContactPhoneNumberParser* CntPhoneNumberParser() const; + + private: + + /** + * C++ constructor. + */ + CCntNumberParser(); + + /** + * Symbian OS constructor. + */ + void ConstructL(); + + private: // Data + + // Parser itself + CContactPhoneNumberParser* iParser; + }; + + +#endif //CCntNumberParser_H + +// End of File