williamr@2: /* williamr@2: * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@2: * under the terms of the License "Eclipse Public License v1.0" williamr@2: * which accompanies this distribution, and is available williamr@2: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: Declaration of RFavouritesSession williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: #ifndef FAVOURITES_SESSION_H williamr@2: #define FAVOURITES_SESSION_H williamr@2: williamr@2: // INCLUDES williamr@2: williamr@2: #include williamr@2: williamr@2: // CLASS DECLARATION williamr@2: williamr@2: /** williamr@2: * RFavouritesSession is the Favourites Engine Session. williamr@2: * It represents the connection to the Favourites Engine Server. williamr@2: */ williamr@2: class RFavouritesSession : public RSessionBase williamr@2: { williamr@2: public: // New methods williamr@2: williamr@2: /** williamr@2: * Get version. williamr@2: * @since 0.9 williamr@2: * @return Version. williamr@2: */ williamr@2: IMPORT_C static TVersion Version(); williamr@2: williamr@2: /** williamr@2: * Connect to Favourites Server. williamr@2: * @since 0.9 williamr@2: * @return Error code. williamr@2: */ williamr@2: IMPORT_C TInt Connect(); williamr@2: williamr@2: /** williamr@2: * Start checking the number of allocated object through this session. williamr@2: * @since 0.9 williamr@2: * @return void williamr@2: */ williamr@2: IMPORT_C void ResourceMark(); williamr@2: williamr@2: /** williamr@2: * Check that the number of allocated object through this session williamr@2: * matches the same of when the last call to ResourceMark was made. williamr@2: * @since 0.9 williamr@2: * @return void williamr@2: */ williamr@2: IMPORT_C void ResourceCheck(); williamr@2: williamr@2: /** williamr@2: * Get number of allocated object through this session. williamr@2: * @since 0.9 williamr@2: * @return void williamr@2: */ williamr@2: IMPORT_C TInt ResourceCount(); williamr@2: williamr@2: /** williamr@2: * Delete database. williamr@2: * @param aName Database name. williamr@2: * @since 0.9 williamr@2: * @return ErrorCode williamr@2: */ williamr@2: IMPORT_C TInt DeleteDatabase( const TDesC& aName ); williamr@2: williamr@2: /** williamr@2: * Simulate a heap allocation failure for server heap. Has empty williamr@2: * implementation for the UDEB server. williamr@2: * @since 0.9 williamr@2: * @param aType Type of heap failure simulation. williamr@2: * @param aRate Rate of failure. williamr@2: * @return void williamr@2: */ williamr@2: IMPORT_C void __DbgSetAllocFail williamr@2: ( RAllocator::TAllocFail aType, TInt aRate ); williamr@2: williamr@2: public: // But not exported williamr@2: williamr@2: /** williamr@2: * Message passing routine. williamr@2: * @since 0.9 williamr@2: * @param aFunction Function. williamr@2: * @param aArgs Arguments. williamr@2: * @param aStatus Request status. williamr@2: */ williamr@2: inline void SendReceive williamr@2: ( williamr@2: TInt aFunction, williamr@2: const TIpcArgs& aArgs, williamr@2: TRequestStatus& aStatus williamr@2: ) const; williamr@2: williamr@2: /** williamr@2: * Message passing routine. williamr@2: * @since 0.9 williamr@2: * @param aFunction Function. williamr@2: * @param aArgs Arguments. williamr@2: * @return Error code. williamr@2: */ williamr@2: inline TInt SendReceive( TInt aFunction, const TIpcArgs& aArgs ) const; williamr@2: williamr@2: /** williamr@2: * Message passing routine. williamr@2: * @since 0.9 williamr@2: * @param aFunction Function. williamr@2: * @return Error code. williamr@2: */ williamr@2: inline TInt SendReceive( TInt aFunction ) const; williamr@2: williamr@2: private: // New methods williamr@2: williamr@2: /** williamr@2: * Connect to Favourites Server. williamr@2: * @since 0.9 williamr@2: * @return Error code. williamr@2: */ williamr@2: TInt DoConnect(); williamr@2: williamr@2: }; williamr@2: williamr@2: #endif williamr@2: williamr@2: #include williamr@2: williamr@2: // End of File