2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Declaration of RFavouritesSession
19 #ifndef FAVOURITES_SESSION_H
20 #define FAVOURITES_SESSION_H
29 * RFavouritesSession is the Favourites Engine Session.
30 * It represents the connection to the Favourites Engine Server.
32 class RFavouritesSession : public RSessionBase
34 public: // New methods
41 IMPORT_C static TVersion Version();
44 * Connect to Favourites Server.
48 IMPORT_C TInt Connect();
51 * Start checking the number of allocated object through this session.
55 IMPORT_C void ResourceMark();
58 * Check that the number of allocated object through this session
59 * matches the same of when the last call to ResourceMark was made.
63 IMPORT_C void ResourceCheck();
66 * Get number of allocated object through this session.
70 IMPORT_C TInt ResourceCount();
74 * @param aName Database name.
78 IMPORT_C TInt DeleteDatabase( const TDesC& aName );
81 * Simulate a heap allocation failure for server heap. Has empty
82 * implementation for the UDEB server.
84 * @param aType Type of heap failure simulation.
85 * @param aRate Rate of failure.
88 IMPORT_C void __DbgSetAllocFail
89 ( RAllocator::TAllocFail aType, TInt aRate );
91 public: // But not exported
94 * Message passing routine.
96 * @param aFunction Function.
97 * @param aArgs Arguments.
98 * @param aStatus Request status.
100 inline void SendReceive
103 const TIpcArgs& aArgs,
104 TRequestStatus& aStatus
108 * Message passing routine.
110 * @param aFunction Function.
111 * @param aArgs Arguments.
112 * @return Error code.
114 inline TInt SendReceive( TInt aFunction, const TIpcArgs& aArgs ) const;
117 * Message passing routine.
119 * @param aFunction Function.
120 * @return Error code.
122 inline TInt SendReceive( TInt aFunction ) const;
124 private: // New methods
127 * Connect to Favourites Server.
129 * @return Error code.
137 #include <FavouritesSession.inl>