sensorservices/sensorserver/inc/client/sensrvclient.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Sensor server client side connector class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef SENSRVCLIENT_H
       
    20 #define SENSRVCLIENT_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 #include "sensrvtypes.h"
       
    25 #include "sensrvclientserver.h"
       
    26 
       
    27 
       
    28 class RSessionBase;
       
    29 
       
    30 
       
    31 /**
       
    32 *  Base class of the client-side handle to a session with the Sensor Server.
       
    33 *
       
    34 *  @lib sensrvclient.lib
       
    35 *  @since S60 5.0
       
    36 */
       
    37 class RSensrvClient : public RSessionBase
       
    38     {
       
    39     public: // New functions
       
    40 
       
    41         /**
       
    42         * Connects to server
       
    43         *
       
    44         * @since S60 5.0
       
    45         * @return KErrNone if connect succesfully, otherwise system wide error
       
    46         */
       
    47         TInt Connect();
       
    48 
       
    49 
       
    50         /**
       
    51         * Send message to server
       
    52         *
       
    53         * @since S60 5.0
       
    54         * @param aRequest The function number identifying the request.
       
    55         * @param aArgs A set of up to arguments
       
    56         * @return KErrNone if connect succesfully, otherwise system wide error
       
    57         */
       
    58         TInt SendReceiveSync( TSensrvServerRequest aRequest, const TIpcArgs& aArgs ) const;
       
    59 
       
    60         /**
       
    61         * Send asynchronous message to server
       
    62         *
       
    63         * @since S60 5.0
       
    64         * @param aRequest The function number identifying the request.
       
    65         * @param aArgs A set of up to arguments
       
    66         * @param aStatus The request status object used to contain the completion status of the request.
       
    67         * @return void
       
    68         */
       
    69         void SendReceiveAsync( TSensrvServerRequest aRequest, const TIpcArgs& aArgs, TRequestStatus& aStatus ) const;
       
    70 
       
    71     private:
       
    72 
       
    73         /**
       
    74         * Return server location
       
    75         * @since S60 5.0
       
    76         * @return location of server
       
    77         */
       
    78          TFullName ServerLocation() const;
       
    79 
       
    80         /**
       
    81         * Return version of server
       
    82         * @since S60 5.0
       
    83         * @return version of server
       
    84         */
       
    85          TVersion ServerVersion() const;
       
    86 
       
    87         /**
       
    88         * Starts server
       
    89         * @since S60 5.0
       
    90         * @return KErrNone if started succesfully, otherwise system wide error
       
    91         */
       
    92         TInt StartServer() const;
       
    93 
       
    94     };
       
    95 
       
    96 #endif      // SENSRVCLIENT_H
       
    97 
       
    98 // End of File