stif/stif_plat/inc/SettingServerClient.h
changeset 0 a03f92240627
equal deleted inserted replaced
-1:000000000000 0:a03f92240627
       
     1 /*
       
     2 * Copyright (c) 2009 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: This file contains the header file of the 
       
    15 * RSettingServer
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef SETTING_SERVER_CLIENT_H
       
    20 #define SETTING_SERVER_CLIENT_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32std.h>
       
    24 #include <e32base.h>
       
    25 
       
    26 #include <TestEngineClient.h>
       
    27 
       
    28 
       
    29 // CONSTANTS
       
    30 
       
    31 // The server version.
       
    32 // A version must be specified when creating a session with the server.
       
    33 const TUint KSettingServerMajorVersionNumber=0;
       
    34 const TUint KSettingServerMinorVersionNumber=1;
       
    35 const TUint KSettingServerVersionNumber=1;
       
    36 
       
    37 // MACROS
       
    38 
       
    39 // DATA TYPES
       
    40 // Opcodes used in message passing between client and server
       
    41 enum TSettingServerRequests
       
    42     {
       
    43     // RSettingServer requests
       
    44     ESettingServerCloseSession,
       
    45 
       
    46     // RLoggerSetting requests
       
    47     EReadLoggerSettingsFromIniFile,
       
    48     EGetLoggerSettings,
       
    49 
       
    50     // IniFile information requests
       
    51     ESetIniFileInformation,
       
    52 
       
    53     // e.g. SetAttribute requests
       
    54     ESetNewIniFileSetting,
       
    55     
       
    56     // Engine
       
    57     EGetEngineSettings,
       
    58     EStoreEngineSettings,
       
    59     };
       
    60 
       
    61 // FUNCTION PROTOTYPES
       
    62 
       
    63 // FORWARD DECLARATIONS
       
    64 
       
    65 // CLASS DECLARATION
       
    66 
       
    67 // DESCRIPTION
       
    68 // RSettingServer is a client class of Setting server
       
    69 // The connect function starts the server, if it not already running.
       
    70 
       
    71 class RSettingServer
       
    72         :public RSessionBase 
       
    73     {
       
    74     public: // Enumerations
       
    75         // None
       
    76 
       
    77     private: // Enumerations
       
    78         // None
       
    79 
       
    80     public:  // Constructors and destructor
       
    81         
       
    82         /**
       
    83         * Constructor.
       
    84         */
       
    85         IMPORT_C RSettingServer();
       
    86 
       
    87         /**
       
    88         * Closes the RSettingServer session.
       
    89         */
       
    90         IMPORT_C void Close();
       
    91 
       
    92     public: // New functions
       
    93         
       
    94         /**
       
    95         * Connect method creates new RSettingServer session 
       
    96         */
       
    97         IMPORT_C TInt Connect();
       
    98 
       
    99         /**
       
   100         * Version returns the client side version number from the RSettingServer.
       
   101         */
       
   102         IMPORT_C TVersion Version() const;
       
   103 
       
   104         /**
       
   105         * Set initialization filename and path settings to Setting server.
       
   106         */
       
   107         IMPORT_C TInt SetIniFileInformation( const TFileName& aIniFile );
       
   108 
       
   109         /**
       
   110         * Read Logger setting from initialization file. Mainly use from
       
   111         * TestEngine side.
       
   112         */
       
   113         IMPORT_C TInt ReadLoggerSettingsFromIniFile( 
       
   114                                         TLoggerSettings& aLoggerSettings );
       
   115 
       
   116         /**
       
   117         * Get Logger settings. Mainly use from Logger side.
       
   118         */
       
   119         IMPORT_C TInt GetLoggerSettings( TLoggerSettings& aLoggerSettings );
       
   120 
       
   121         /**
       
   122         * Set new initialization file setting(e.g. SetAttribute).
       
   123         */
       
   124         IMPORT_C TInt SetNewIniFileSetting( TName& aNewIniFileSetting );
       
   125         
       
   126         /**
       
   127         * Get TestEngine settings
       
   128         */
       
   129         IMPORT_C TInt GetEngineSettings(TEngineSettings& aEngineSettings);
       
   130 
       
   131         /**
       
   132         * Set TestEngine settings
       
   133         */
       
   134         IMPORT_C TInt StoreEngineSettings(TEngineSettings& aEngineSettings);
       
   135 
       
   136     public:     // Functions from base classes
       
   137         // None
       
   138 
       
   139     protected:  // New functions
       
   140         // None
       
   141 
       
   142     protected:  // Functions from base classes
       
   143         // None
       
   144 
       
   145     private:    // Functions from base classes
       
   146         // None
       
   147 
       
   148     public:     // Data
       
   149         // None
       
   150 
       
   151     protected:  // Data
       
   152         // None
       
   153 
       
   154     private:    // Data
       
   155         // None
       
   156 
       
   157     public:     // Friend classes
       
   158         // None
       
   159 
       
   160     protected:  // Friend classes
       
   161         // None
       
   162 
       
   163     private:    // Friend classes
       
   164         // None
       
   165 
       
   166     };
       
   167 
       
   168 #endif // SETTING_SERVER_CLIENT_H
       
   169 
       
   170 // End of File