sl@0: // Copyright (c) 2007-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: @file sl@0: @test sl@0: */ sl@0: sl@0: #ifndef __T_WSERV_CONFIG_DATA_H__ sl@0: #define __T_WSERV_CONFIG_DATA_H__ sl@0: sl@0: #include sl@0: sl@0: const TInt KMaxWServConfigDataSize=256; sl@0: typedef TBuf TWServConfigData; sl@0: sl@0: /** sl@0: * Test Active Notification class sl@0: * sl@0: */ sl@0: class CT_WServConfigData sl@0: { sl@0: public: sl@0: /** sl@0: * Constructor sl@0: */ sl@0: CT_WServConfigData(); sl@0: sl@0: /** sl@0: * Destructor sl@0: */ sl@0: virtual ~CT_WServConfigData(); sl@0: sl@0: /** sl@0: * Add a data entry to the config sl@0: * sl@0: * @param aName name of the config entry sl@0: * @param aData the data to add. sl@0: * @leave KErrAlreadyExists if the config entry aName already exists sl@0: */ sl@0: void AddDataL(const TDesC& aName, const TDesC& aData); sl@0: sl@0: /** sl@0: * Add a data entry to the config sl@0: * sl@0: * @param aName name of the config entry to be replaced sl@0: * @param aData the data to add. sl@0: * @leave KErrNotFound if the config entry aName is not found sl@0: */ sl@0: void ReplaceData(const TDesC& aName, const TDesC& aData); sl@0: sl@0: /** sl@0: * Delete a data entry from the config sl@0: * sl@0: * @param aName name of the config entry sl@0: * sl@0: * @leave KErrNotFound if the config entry aName is not found sl@0: */ sl@0: void DeleteDataL(const TDesC& aName); sl@0: sl@0: /** sl@0: * Get the list of data sl@0: * sl@0: * @param aIndex of an index into the list of data sl@0: * sl@0: * @return Pointer to list of data sl@0: */ sl@0: const TWServConfigData& GetData(const TInt aIndex) const; sl@0: sl@0: /** sl@0: * Get the list of names sl@0: * sl@0: * @param aIndex of an index into the list of names sl@0: * sl@0: * @return Pointer to list of names sl@0: */ sl@0: const TWServConfigData& GetName(const TInt aIndex) const; sl@0: sl@0: sl@0: /** sl@0: * Return the number of entries sl@0: * sl@0: * @return The number of entries stored in the config data. sl@0: * @leave KErrGeneral sl@0: */ sl@0: TInt NoOfEntriesL() const; sl@0: sl@0: /** sl@0: * Empty the object config sl@0: */ sl@0: void Empty(); sl@0: sl@0: private: sl@0: RArray iArrayName; sl@0: RArray iArrayData; sl@0: }; sl@0: sl@0: #endif // __T_WSERV_CONFIG_DATA_H__ sl@0: