epoc32/include/mw/favouritessession.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@2
     5
* under the terms of the License "Eclipse Public License v1.0"
williamr@2
     6
* which accompanies this distribution, and is available
williamr@2
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description:  Declaration of RFavouritesSession
williamr@2
    15
*
williamr@2
    16
*/
williamr@2
    17
williamr@2
    18
williamr@2
    19
#ifndef FAVOURITES_SESSION_H
williamr@2
    20
#define FAVOURITES_SESSION_H
williamr@2
    21
williamr@2
    22
//  INCLUDES
williamr@2
    23
williamr@2
    24
#include <e32base.h>
williamr@2
    25
williamr@2
    26
// CLASS DECLARATION
williamr@2
    27
williamr@2
    28
/**
williamr@2
    29
* RFavouritesSession is the Favourites Engine Session.
williamr@2
    30
* It represents the connection to the Favourites Engine Server.
williamr@2
    31
*/
williamr@2
    32
class RFavouritesSession : public RSessionBase
williamr@2
    33
    {
williamr@2
    34
    public:     // New methods
williamr@2
    35
williamr@2
    36
        /**
williamr@2
    37
        * Get version.
williamr@2
    38
        * @since 0.9       
williamr@2
    39
        * @return Version.
williamr@2
    40
        */
williamr@2
    41
        IMPORT_C static TVersion Version();
williamr@2
    42
williamr@2
    43
        /**
williamr@2
    44
        * Connect to Favourites Server.
williamr@2
    45
        * @since 0.9       
williamr@2
    46
        * @return Error code.
williamr@2
    47
        */
williamr@2
    48
        IMPORT_C TInt Connect();
williamr@2
    49
williamr@2
    50
        /**
williamr@2
    51
        * Start checking the number of allocated object through this session.
williamr@2
    52
        * @since 0.9       
williamr@2
    53
        * @return void
williamr@2
    54
        */
williamr@2
    55
        IMPORT_C void ResourceMark();
williamr@2
    56
williamr@2
    57
        /**
williamr@2
    58
        * Check that the number of allocated object through this session
williamr@2
    59
        * matches the same of when the last call to ResourceMark was made.
williamr@2
    60
        * @since 0.9       
williamr@2
    61
        * @return void
williamr@2
    62
        */
williamr@2
    63
        IMPORT_C void ResourceCheck();
williamr@2
    64
williamr@2
    65
        /**
williamr@2
    66
        * Get number of allocated object through this session.
williamr@2
    67
        * @since 0.9       
williamr@2
    68
        * @return void
williamr@2
    69
        */
williamr@2
    70
        IMPORT_C TInt ResourceCount();
williamr@2
    71
williamr@2
    72
        /**
williamr@2
    73
        * Delete database.
williamr@2
    74
        * @param aName Database name.
williamr@2
    75
        * @since 0.9       
williamr@2
    76
        * @return ErrorCode
williamr@2
    77
        */
williamr@2
    78
        IMPORT_C TInt DeleteDatabase( const TDesC& aName );
williamr@2
    79
williamr@2
    80
        /**
williamr@2
    81
        * Simulate a heap allocation failure for server heap. Has empty
williamr@2
    82
        * implementation for the UDEB server.
williamr@2
    83
        * @since 0.9       
williamr@2
    84
        * @param aType Type of heap failure simulation.
williamr@2
    85
        * @param aRate Rate of failure.
williamr@2
    86
        * @return void 
williamr@2
    87
        */
williamr@2
    88
        IMPORT_C void __DbgSetAllocFail
williamr@2
    89
            ( RAllocator::TAllocFail aType, TInt aRate );
williamr@2
    90
williamr@2
    91
    public:     // But not exported
williamr@2
    92
williamr@2
    93
        /**
williamr@2
    94
        * Message passing routine.
williamr@2
    95
        * @since 0.9       
williamr@2
    96
        * @param aFunction Function.
williamr@2
    97
        * @param aArgs Arguments.
williamr@2
    98
        * @param aStatus Request status.
williamr@2
    99
        */
williamr@2
   100
        inline void SendReceive
williamr@2
   101
            (
williamr@2
   102
            TInt aFunction,
williamr@2
   103
            const TIpcArgs& aArgs,
williamr@2
   104
            TRequestStatus& aStatus
williamr@2
   105
            ) const;
williamr@2
   106
williamr@2
   107
        /**
williamr@2
   108
        * Message passing routine.
williamr@2
   109
        * @since 0.9       
williamr@2
   110
        * @param aFunction Function.
williamr@2
   111
        * @param aArgs Arguments.
williamr@2
   112
        * @return Error code.
williamr@2
   113
        */
williamr@2
   114
        inline TInt SendReceive( TInt aFunction, const TIpcArgs& aArgs ) const;
williamr@2
   115
williamr@2
   116
        /**
williamr@2
   117
        * Message passing routine.
williamr@2
   118
        * @since 0.9       
williamr@2
   119
        * @param aFunction Function.
williamr@2
   120
        * @return Error code.
williamr@2
   121
        */
williamr@2
   122
        inline TInt SendReceive( TInt aFunction ) const;
williamr@2
   123
williamr@2
   124
    private:    // New methods
williamr@2
   125
williamr@2
   126
        /**
williamr@2
   127
        * Connect to Favourites Server.
williamr@2
   128
        * @since 0.9       
williamr@2
   129
        * @return Error code.
williamr@2
   130
        */
williamr@2
   131
        TInt DoConnect();
williamr@2
   132
williamr@2
   133
    };
williamr@2
   134
williamr@2
   135
#endif
williamr@2
   136
williamr@4
   137
#include <favouritessession.inl>
williamr@2
   138
williamr@2
   139
// End of File