diff -r 502e5d91ad42 -r 15e4dd19031c idlefw/inc/framework/caicpscommandbuffer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/idlefw/inc/framework/caicpscommandbuffer.h Wed Mar 31 22:04:35 2010 +0300 @@ -0,0 +1,150 @@ +/* +* Copyright (c) 2010 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: Cps command buffer +* +*/ + + +#ifndef C_CAICPSCOMMANDBUFFER_H +#define C_CAICPSCOMMANDBUFFER_H + +// System includes +#include + +// User includes +#include + +// Forward declarations +class CLiwGenericParamList; +class CLiwServiceHandler; +class CLiwCriteriaItem; +class CAiCpsExecuteParam; +class MLiwInterface; + +/** + * AI Cps command buffer + * + * @ingroup group_aifw + * @lib aifw + * @since S60 v5.2 + */ +NONSHARABLE_CLASS( CAiCpsCommandBuffer ) : public CBase, + public MAiCpsCommandBuffer + { +public: + // constructors and destructor + + /** + * Two-phased constructors. + */ + static CAiCpsCommandBuffer* NewL(); + static CAiCpsCommandBuffer* NewLC(); + + /** + * Destructor. + */ + ~CAiCpsCommandBuffer(); + +private: + // constructors + + /** + * C++ default constructor + */ + CAiCpsCommandBuffer(); + + /** + * 2nd phase constructor + */ + void ConstructL(); + +public: + // new function + + /** + * Flushes command buffer + * + * @since S60 v5.2 + */ + void Flush(); + +private: + // from MAiCpsCommandBuffer + + /** + * @see MAiCpsCommandBuffer + */ + void AddCommand( const TDesC& aPluginId, const TDesC& aType, + CLiwDefaultMap* aFilter, const TDesC8& aAction); + +private: + // new functions + /** + * Gets the CPS interface + * + * @since S60 5.2 + */ + void GetCPSInterfaceL(); + + /** + * Adds a CPS command execute commnad for a spcific Plugin + * Note: aType and Filter will overwrite the previous value + * + * @since S60 5.2 + * @param aPluginId plugin id. + * @param aType type of the cps registry. + * @param aFilter filter values. + * @param aAction action trigger. + */ + void DoAddCommandL(const TDesC& aPluginId,const TDesC& aType, + CLiwDefaultMap* aFilter, const TDesC8& aAction ); + + /** + * Flush all the CPS execute commands.. + * + * @since S60 5.2 + */ + void DoFlushL(); + +private: + // data + /** + * SAPI service handler. + * Owned. + */ + CLiwServiceHandler* iServiceHandler; + + /** + * CPS SAPI service. + * Owned. + */ + CLiwCriteriaItem* iCpsService; + + /** + * Provides hsps services. + * Owned. + */ + MLiwInterface* iCpsInterface; + + /** + * Plugins execute parameter array + * Owned. + */ + RPointerArray iPlugins; + }; + +#endif // C_CAICPSCOMMANDBUFFER_H + +// End of file +