epoc32/include/mw/favouritessession.h
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
     1.1 --- a/epoc32/include/mw/favouritessession.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/mw/favouritessession.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,139 @@
     1.4 -favouritessession.h
     1.5 +/*
     1.6 +* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
     1.7 +* All rights reserved.
     1.8 +* This component and the accompanying materials are made available
     1.9 +* under the terms of the License "Eclipse Public License v1.0"
    1.10 +* which accompanies this distribution, and is available
    1.11 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.12 +*
    1.13 +* Initial Contributors:
    1.14 +* Nokia Corporation - initial contribution.
    1.15 +*
    1.16 +* Contributors:
    1.17 +*
    1.18 +* Description:  Declaration of RFavouritesSession
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +#ifndef FAVOURITES_SESSION_H
    1.24 +#define FAVOURITES_SESSION_H
    1.25 +
    1.26 +//  INCLUDES
    1.27 +
    1.28 +#include <e32base.h>
    1.29 +
    1.30 +// CLASS DECLARATION
    1.31 +
    1.32 +/**
    1.33 +* RFavouritesSession is the Favourites Engine Session.
    1.34 +* It represents the connection to the Favourites Engine Server.
    1.35 +*/
    1.36 +class RFavouritesSession : public RSessionBase
    1.37 +    {
    1.38 +    public:     // New methods
    1.39 +
    1.40 +        /**
    1.41 +        * Get version.
    1.42 +        * @since 0.9       
    1.43 +        * @return Version.
    1.44 +        */
    1.45 +        IMPORT_C static TVersion Version();
    1.46 +
    1.47 +        /**
    1.48 +        * Connect to Favourites Server.
    1.49 +        * @since 0.9       
    1.50 +        * @return Error code.
    1.51 +        */
    1.52 +        IMPORT_C TInt Connect();
    1.53 +
    1.54 +        /**
    1.55 +        * Start checking the number of allocated object through this session.
    1.56 +        * @since 0.9       
    1.57 +        * @return void
    1.58 +        */
    1.59 +        IMPORT_C void ResourceMark();
    1.60 +
    1.61 +        /**
    1.62 +        * Check that the number of allocated object through this session
    1.63 +        * matches the same of when the last call to ResourceMark was made.
    1.64 +        * @since 0.9       
    1.65 +        * @return void
    1.66 +        */
    1.67 +        IMPORT_C void ResourceCheck();
    1.68 +
    1.69 +        /**
    1.70 +        * Get number of allocated object through this session.
    1.71 +        * @since 0.9       
    1.72 +        * @return void
    1.73 +        */
    1.74 +        IMPORT_C TInt ResourceCount();
    1.75 +
    1.76 +        /**
    1.77 +        * Delete database.
    1.78 +        * @param aName Database name.
    1.79 +        * @since 0.9       
    1.80 +        * @return ErrorCode
    1.81 +        */
    1.82 +        IMPORT_C TInt DeleteDatabase( const TDesC& aName );
    1.83 +
    1.84 +        /**
    1.85 +        * Simulate a heap allocation failure for server heap. Has empty
    1.86 +        * implementation for the UDEB server.
    1.87 +        * @since 0.9       
    1.88 +        * @param aType Type of heap failure simulation.
    1.89 +        * @param aRate Rate of failure.
    1.90 +        * @return void 
    1.91 +        */
    1.92 +        IMPORT_C void __DbgSetAllocFail
    1.93 +            ( RAllocator::TAllocFail aType, TInt aRate );
    1.94 +
    1.95 +    public:     // But not exported
    1.96 +
    1.97 +        /**
    1.98 +        * Message passing routine.
    1.99 +        * @since 0.9       
   1.100 +        * @param aFunction Function.
   1.101 +        * @param aArgs Arguments.
   1.102 +        * @param aStatus Request status.
   1.103 +        */
   1.104 +        inline void SendReceive
   1.105 +            (
   1.106 +            TInt aFunction,
   1.107 +            const TIpcArgs& aArgs,
   1.108 +            TRequestStatus& aStatus
   1.109 +            ) const;
   1.110 +
   1.111 +        /**
   1.112 +        * Message passing routine.
   1.113 +        * @since 0.9       
   1.114 +        * @param aFunction Function.
   1.115 +        * @param aArgs Arguments.
   1.116 +        * @return Error code.
   1.117 +        */
   1.118 +        inline TInt SendReceive( TInt aFunction, const TIpcArgs& aArgs ) const;
   1.119 +
   1.120 +        /**
   1.121 +        * Message passing routine.
   1.122 +        * @since 0.9       
   1.123 +        * @param aFunction Function.
   1.124 +        * @return Error code.
   1.125 +        */
   1.126 +        inline TInt SendReceive( TInt aFunction ) const;
   1.127 +
   1.128 +    private:    // New methods
   1.129 +
   1.130 +        /**
   1.131 +        * Connect to Favourites Server.
   1.132 +        * @since 0.9       
   1.133 +        * @return Error code.
   1.134 +        */
   1.135 +        TInt DoConnect();
   1.136 +
   1.137 +    };
   1.138 +
   1.139 +#endif
   1.140 +
   1.141 +#include <FavouritesSession.inl>
   1.142 +
   1.143 +// End of File