contextframework/cfw/inc/cfclient/CFClientSession.h
changeset 0 2e3d3ce01487
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 /*
       
     2 * Copyright (c) 2002-2007 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 "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:  RCFClientSession class declaration.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef R_CFCLIENTSESSION_H
       
    20 #define R_CFCLIENTSESSION_H
       
    21 
       
    22 #include <e32std.h>
       
    23 
       
    24 /**
       
    25 * Client side session.
       
    26 *
       
    27 * @since S60 5.0
       
    28 * @lib -
       
    29 */
       
    30 NONSHARABLE_CLASS( RCFClientSession ) : public RSessionBase
       
    31     {
       
    32     public:
       
    33     
       
    34         /**
       
    35         * C++ constructor.
       
    36         */
       
    37         RCFClientSession();
       
    38 
       
    39         /**
       
    40         * Connects the client session to the Context Manager server.
       
    41         * ConnectL() should be the first function called on an
       
    42         * RCFClientSession object after it is created.
       
    43         * This function will start the server if it is not already running.
       
    44         */
       
    45         void ConnectL();
       
    46         
       
    47         /** 
       
    48         * Gets the version number of the Context Manager server.
       
    49         */
       
    50         TVersion Version() const;
       
    51         
       
    52         /**
       
    53          * Sends a synchronous request to cfserver.
       
    54          * 
       
    55          * @since S60 5.0
       
    56          * @param aFunction IPC function id.
       
    57          * @return Message completion code.
       
    58          */
       
    59         TInt SendSync( TInt aFunction ) const;
       
    60         
       
    61         /**
       
    62          * Sends a synchronous request to cfserver.
       
    63          * 
       
    64          * @since S60 5.0
       
    65          * @param aFunction IPC function id.
       
    66          * @param aArgs Message arguments.
       
    67          * @return Message completion code.
       
    68          */
       
    69         TInt SendSync( TInt aFunction, const TIpcArgs &aArgs ) const;
       
    70         
       
    71         /**
       
    72          * Sends an asynchronous request to cfserver.
       
    73          * 
       
    74          * @since S60 5.0
       
    75          * @param aFunction IPC function id.
       
    76          * @param aArgs Message arguments.
       
    77          * @param aStatus Status of the sync request.
       
    78          * @return None.
       
    79          */
       
    80         void SendAsync( TInt aFunction,
       
    81             const TIpcArgs &aArgs,
       
    82             TRequestStatus &aStatus ) const;        
       
    83 
       
    84     private: // New functions
       
    85 
       
    86         // Start server process
       
    87         TInt StartServer();
       
    88     };
       
    89 
       
    90 #endif