sl@0: // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: sl@0: #ifndef __MMFCUSTOMCOMMANDPARSERMANAGER_H__ sl@0: #define __MMFCUSTOMCOMMANDPARSERMANAGER_H__ sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: Class to manage custom command parsers. sl@0: sl@0: An object of this type is owned by the controller framework to contain all the custom command sl@0: parsers for the controller plugin. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: class CMMFCustomCommandParserManager : public CBase sl@0: { sl@0: public: sl@0: /** sl@0: Factory constructor. sl@0: sl@0: @return A pointer to the newly created object. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C static CMMFCustomCommandParserManager* NewL(); sl@0: sl@0: /** sl@0: Destructor. sl@0: sl@0: Deletes all custom command parsers added to the manager. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C ~CMMFCustomCommandParserManager(); sl@0: sl@0: /** sl@0: Attempts to find a custom command parser capable of handling the message. sl@0: sl@0: @param aMessage sl@0: The message to be handled. sl@0: sl@0: @return A boolean indicating in the message has been handled. ETrue if the message has been handled, EFalse sl@0: if it has not. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C TBool HandleRequest(TMMFMessage& aMessage); sl@0: sl@0: /** sl@0: Adds a custom command parser to the manager. The manager takes ownership of the parser. sl@0: sl@0: Note: sl@0: This method will leave if it fails to add the parser. If it does leave, ownership sl@0: of the parser will remain with the caller. sl@0: sl@0: @param aParser sl@0: A reference to the parser to be added to the manager. sl@0: sl@0: @since 7.0s sl@0: */ sl@0: IMPORT_C void AddCustomCommandParserL(CMMFCustomCommandParserBase& aParser); sl@0: private: sl@0: CMMFCustomCommandParserManager(); sl@0: private: sl@0: /** sl@0: The array of custom command parsers. sl@0: */ sl@0: RPointerArray iParsers; sl@0: }; sl@0: sl@0: #endif __MMFCUSTOMCOMMANDPARSERMANAGER_H__