diff -r 9e077f9a342c -r 2c7f27287390 idlefw/tsrc/idleint/stubs/aiutility.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/idlefw/tsrc/idleint/stubs/aiutility.h Thu Jul 15 18:59:18 2010 +0300 @@ -0,0 +1,106 @@ +/* +* 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: +* +*/ + + +#ifndef AIUTILITY_H +#define AIUTILITY_H + +#include +#include + +class MAiPSPropertyObserver; +class MAiStrParser; +class MAiContentItemIterator; +class MAiPluginSettings; +class MAiPluginTool; + +/** +* Active Idle Utility Library. +* +* @since S60 3.2 +*/ +namespace AiUtility + { + + /** + * Creates a Publish & Subscribe keys observer. + * + * @param aCallBack callback method to call when the key value changes. + * @param aCategory key category. + * @param aKey key to observe in category. + * @return pointer to a new publish and subscribe keys observer. + */ + IMPORT_C MAiPSPropertyObserver* CreatePSPropertyObserverL( + TCallBack aCallBack, + TUid aCategory, + TInt aKey ); + + /** + * Creates a string parser. + * + * @return pointer to a new string parser. + */ + IMPORT_C MAiStrParser* CreateStrParserL(); + + /** + * Creates a new iterator instance from a TAiContentItem array. + * + * @since S60 3.2 + * @param aArray content item array. + * @param aCount number of content items in aArray. + * @return a new iterator object for aArray. + */ + IMPORT_C MAiContentItemIterator* CreateContentItemArrayIteratorL( + const TAiContentItem* aArray, + TInt aCount ); + + /** + * Helper factory function for creating a MAiContentItemIterator out + * of a const C array of TAiContentItem objects. This function infers the item + * count of the array automatically from the array argument passed to it. + * + * @param aArray const C array of TAiContentItem objects. + * @return MAiContentItemIterator instance for iterating aArray. Client + * takes ownership of the returned object. + */ + template + inline MAiContentItemIterator* CreateContentItemArrayIteratorL + ( const TAiContentItem (&aArray)[N] ) + { + return AiUtility::CreateContentItemArrayIteratorL(aArray, N); + } + + /** + * Creates the plugin settings. + * + * @since S60 3.2 + * @return pointer to plugin settings. + */ + IMPORT_C MAiPluginSettings* CreatePluginSettingsL(); + + /** + * Creates the plugin tool. + * + * @since S60 3.2 + * @return pointer to plugin tool. + */ + IMPORT_C MAiPluginTool* CreatePluginToolL(); + + } + +#endif // AIUTILITY_H +