iptel_plat/cch_client_api/inc/cchserver.h
branchRCL_3
changeset 21 f742655b05bf
parent 20 65a3ef1d5bd0
child 22 d38647835c2e
equal deleted inserted replaced
20:65a3ef1d5bd0 21:f742655b05bf
     1 /*
       
     2 * Copyright (c) 2006-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:  RCCHServer declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef R_CCHSERVER_H
       
    20 #define R_CCHSERVER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>
       
    24 #include <e32base.h>
       
    25 
       
    26 /** @file CCHServer.h
       
    27  * API to access Converged Connection Handler server functionalities.
       
    28  * 
       
    29  * Client uses RCCHServer and RCCHClient classes to create client-server 
       
    30  * connection to Converged Connection Handler server. After successful 
       
    31  * connection client can access server functionalities trought RCCHClient. 
       
    32  * 
       
    33  * 
       
    34  * Example usage of API:  
       
    35  * @code
       
    36  * // Creating connection and subsession to server
       
    37  * #include <cchclient.h>
       
    38  * #include <cchserver.h>
       
    39  * 
       
    40  * RCCHServer  iServer;
       
    41  * RCCHClient  iClient;
       
    42  * 
       
    43  * iServer = new (ELeave) RCCHServer();
       
    44  * iClient = new (ELeave) RCCHClient();
       
    45  * 
       
    46  * // Start CCHServer and open session
       
    47  * User::LeaveIfError( iServer->Connect() );
       
    48  * // Open subsession
       
    49  * User::LeaveIfError( iClient->Open( *iServer ) );
       
    50  * ...
       
    51  * @endcode
       
    52  */
       
    53   
       
    54 // CONSTANTS
       
    55 // None
       
    56 
       
    57 // MACROS
       
    58 // None
       
    59 
       
    60 // DATA TYPES
       
    61 // None
       
    62 
       
    63 // FUNCTION PROTOTYPES
       
    64 // None
       
    65 
       
    66 // FORWARD DECLARATIONS
       
    67 // None
       
    68 
       
    69 // CLASS DECLARATION
       
    70     
       
    71 /**
       
    72  *  RCCHServer declaration
       
    73  *  This class hides inter-thread communication between client
       
    74  *  and server. Hides also asynchronous notification services.
       
    75  *  @lib cchclient.lib
       
    76  *  @since S60 3.2
       
    77  */
       
    78 class RCCHServer : public RSessionBase
       
    79     {
       
    80 
       
    81 public: // Constructors and destructor
       
    82     
       
    83     /**
       
    84      * C++ default constructor
       
    85      */
       
    86     IMPORT_C RCCHServer();
       
    87 
       
    88 public: // New functions
       
    89 
       
    90     /**
       
    91      * Connect to CCH server
       
    92      * @since S60 3.2
       
    93      * @return General Symbian error code
       
    94      */
       
    95     IMPORT_C TInt Connect();
       
    96     
       
    97     /**
       
    98      * Disconnect from CCH server
       
    99      * @since S60 3.2
       
   100      */
       
   101     IMPORT_C void Disconnect();
       
   102     
       
   103     /**
       
   104      * Get version information
       
   105      * @since S60 3.2
       
   106      * @return Version information
       
   107      */
       
   108     TVersion Version() const;
       
   109 
       
   110 protected:  // New functions
       
   111         
       
   112     /**
       
   113      * Start the server during Connect() if the server is not loaded.
       
   114      * @since S60 3.2
       
   115      * @return General Symbian error code.
       
   116      */
       
   117     TInt StartServer() const;
       
   118 
       
   119     };
       
   120 
       
   121 #endif // R_CCHSERVER_H
       
   122 
       
   123 // End of file