web_pub/favourites_engine_api/inc/FavouritesHandle.h
changeset 0 dd21522fd290
child 25 0ed94ceaa377
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     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".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Declaration of RFavouritesHandle
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef FAVOURITES_HANDLE_H
       
    20 #define FAVOURITES_HANDLE_H
       
    21 
       
    22 //  INCLUDES
       
    23 
       
    24 #include <e32base.h>
       
    25 #include <FavouritesSession.h>
       
    26 
       
    27 // CLASS DECLARATION
       
    28 
       
    29 /**
       
    30 * RFavouritesHandle is the favourite object handle.
       
    31 */
       
    32 class RFavouritesHandle
       
    33     {
       
    34 
       
    35     public:     // Constructor and destructor
       
    36         
       
    37         /**
       
    38         * Constructor.
       
    39         * @since 0.9       
       
    40         */
       
    41         inline RFavouritesHandle();
       
    42 
       
    43         /**
       
    44         * Close the object.
       
    45         * @since 0.9       
       
    46         * return void
       
    47         */
       
    48         IMPORT_C void Close();
       
    49 
       
    50     public:     // New methods
       
    51 
       
    52         /**
       
    53         * Get handle number.
       
    54         * @since 0.9       
       
    55         * @return Handle number.
       
    56         */
       
    57         inline TInt Handle() const;
       
    58 
       
    59     protected:  // New methods
       
    60 
       
    61         /**
       
    62         * Open the object.
       
    63         * @since 0.9       
       
    64         * @param aSess Session to be used.
       
    65         * @param aFunction Function.
       
    66         * @param aArgs Arguments.
       
    67         * @return Error code.
       
    68         */
       
    69         TInt Open
       
    70             (
       
    71             RFavouritesSession& aSess,
       
    72             TInt aFunction,
       
    73             const TIpcArgs& aArgs
       
    74             );
       
    75 
       
    76         /**
       
    77         * Open this object using other object.
       
    78         * @since 0.9       
       
    79         * @param aHandle Handle used to open this object.
       
    80         * @param aFunction Function.
       
    81         * @param aArgs Arguments.
       
    82         * @return Error code.
       
    83         */
       
    84         TInt Open
       
    85             (
       
    86             RFavouritesHandle& aHandle,
       
    87             TInt aFunction,
       
    88             const TIpcArgs& aArgs
       
    89             );
       
    90 
       
    91         /**
       
    92         * Message passing routine.
       
    93         * @since 0.9       
       
    94         * @param aFunction Function.
       
    95         * @param aArgs Arguments.
       
    96         * @param aStatus Request status.
       
    97         */
       
    98         void SendReceive
       
    99             (
       
   100             TInt aFunction,
       
   101             const TIpcArgs& aArgs,
       
   102             TRequestStatus& aStatus
       
   103             ) const;
       
   104 
       
   105         /**
       
   106         * Message passing routine.
       
   107         * @since 0.9       
       
   108         * @param aFunction Function.
       
   109         * @param aArgs Arguments.
       
   110         * @return Error code.
       
   111         */
       
   112         TInt SendReceive( TInt aFunction, const TIpcArgs& aArgs ) const;
       
   113 
       
   114         /**
       
   115         * Message passing routine.
       
   116         * @since 0.9       
       
   117         * @param aFunction Function.
       
   118         * @return Error code.
       
   119         */
       
   120         TInt SendReceive( TInt aFunction ) const;
       
   121 
       
   122     protected:  // Data
       
   123 
       
   124         RFavouritesSession iSess;   ///< Session handle.
       
   125         TInt iHandle;               ///< Handle number.
       
   126 
       
   127     };
       
   128 
       
   129 #include <FavouritesHandle.inl>
       
   130 
       
   131 #endif
       
   132             
       
   133 // End of File