os/mm/mmlibs/mmfw/inc/mmf/ControllerFramework/mmfcustomcommandparsermanager.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/mmlibs/mmfw/inc/mmf/ControllerFramework/mmfcustomcommandparsermanager.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,87 @@
     1.4 +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +
    1.20 +#ifndef __MMFCUSTOMCOMMANDPARSERMANAGER_H__
    1.21 +#define __MMFCUSTOMCOMMANDPARSERMANAGER_H__
    1.22 +
    1.23 +/**
    1.24 +@publishedPartner
    1.25 +@released
    1.26 +
    1.27 +Class to manage custom command parsers.
    1.28 +
    1.29 +An object of this type is owned by the controller framework to contain all the custom command
    1.30 +parsers for the controller plugin.
    1.31 +
    1.32 +@since 7.0s
    1.33 +*/
    1.34 +class CMMFCustomCommandParserManager : public CBase
    1.35 +	{
    1.36 +public:
    1.37 +	/**
    1.38 +	Factory constructor.
    1.39 +
    1.40 +	@return A pointer to the newly created object.
    1.41 +
    1.42 +	@since 7.0s
    1.43 +	*/
    1.44 +	IMPORT_C static CMMFCustomCommandParserManager* NewL();
    1.45 +
    1.46 +	/**
    1.47 +	Destructor.
    1.48 +
    1.49 +	Deletes all custom command parsers added to the manager.
    1.50 +
    1.51 +	@since 7.0s
    1.52 +	*/
    1.53 +	IMPORT_C ~CMMFCustomCommandParserManager();
    1.54 +
    1.55 +	/**
    1.56 +	Attempts to find a custom command parser capable of handling the message.
    1.57 +
    1.58 +	@param  aMessage
    1.59 +            The message to be handled.
    1.60 +
    1.61 +	@return A boolean indicating in the message has been handled. ETrue if the message has been handled, EFalse
    1.62 +	        if it has not.
    1.63 +
    1.64 +	@since 7.0s
    1.65 +	*/
    1.66 +	IMPORT_C TBool HandleRequest(TMMFMessage& aMessage);
    1.67 +
    1.68 +	/**
    1.69 +	Adds a custom command parser to the manager.  The manager takes ownership of the parser.
    1.70 +
    1.71 +	Note:
    1.72 +	This method will leave if it fails to add the parser. If it does leave, ownership
    1.73 +	of the parser will remain with the caller.
    1.74 +
    1.75 +	@param  aParser
    1.76 +	        A reference to the parser to be added to the manager.
    1.77 +
    1.78 +	@since 7.0s
    1.79 +	*/
    1.80 +	IMPORT_C void AddCustomCommandParserL(CMMFCustomCommandParserBase& aParser);
    1.81 +private:
    1.82 +	CMMFCustomCommandParserManager();
    1.83 +private:
    1.84 +	/**
    1.85 +	The array of custom command parsers.
    1.86 +	*/
    1.87 +	RPointerArray<CMMFCustomCommandParserBase> iParsers;
    1.88 +	};
    1.89 +
    1.90 +#endif __MMFCUSTOMCOMMANDPARSERMANAGER_H__