multimediacommsengine/tsrc/testdriver/testclient/ui/src/TTcSettings.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     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 "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:  See class definition below.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __TTCSETTINGS_H__
       
    19 #define __TTCSETTINGS_H__
       
    20 
       
    21 // INCLUDES
       
    22 #include <e32std.h>
       
    23 #include <in_sock.h>
       
    24 
       
    25 // CLASS DEFINITION
       
    26 /**
       
    27  * TTcSettings implements a simple container for application settings.
       
    28  * It is able to load and store the settings items to/from a binary file
       
    29  * (c:\system\data\TestClient.ini).
       
    30  */
       
    31 class TTcSettings
       
    32 	{
       
    33 	public:  // Constructors and destructor
       
    34             
       
    35 		/// Default constructor
       
    36 		TTcSettings();
       
    37 
       
    38 		// Destructor
       
    39 		~TTcSettings();
       
    40 
       
    41 	public: // New methods
       
    42 
       
    43 		/// Load the settings from the dedicated settings file.
       
    44 		void Load();
       
    45 
       
    46 		/// Save the settings to the settings file.
       
    47 		void Store();
       
    48 
       
    49 	private: // New methods
       
    50 
       
    51 		/**
       
    52 		 * Performs the actual loading from a open data stream
       
    53 		 *
       
    54 		 * @param aStream Reference to an initialized read stream
       
    55 		 */
       
    56 		void doLoadL( RReadStream& aStream );
       
    57 
       
    58 		/**
       
    59 		 * Performs the actual storing to a open data stream
       
    60 		 *
       
    61 		 * @param aStream Reference to an initialized write stream
       
    62 		 */
       
    63 		void doStoreL( RWriteStream& aStream );
       
    64 
       
    65 	public: // Data
       
    66 
       
    67 		/// Bearer selection (corresponding enumerations can be found from testclientconstants.h)
       
    68 		TInt iBearerType;
       
    69 
       
    70 		/// Autoconnect flag: TestClient starts listening for incoming
       
    71 		/// connections automatically at startup if this is ETrue
       
    72 		/// Default value is EFalse.
       
    73 		TBool iAutoConnect;
       
    74 
       
    75 		/// TCP Port number. Default value is 5070.
       
    76 		TInt iTCPPort;
       
    77 
       
    78 		/// Internet Access Point ID. Default value is 1.
       
    79 		TInt iIAPId;
       
    80 
       
    81 		/// Indicates if TestClient has been run before. Default value is ETrue.
       
    82 		TBool iIsFirstRun;
       
    83 		
       
    84 		// CSY name (corresponding enumerations can be found from testclientconstants.h)
       
    85 		TInt iCSYName;
       
    86 		
       
    87 		// Comms port name (corresponding enumerations can be found from testclientconstants.h)
       
    88 		TInt iCommPort;
       
    89 		
       
    90 		// Baudrate of comms
       
    91 		TInt iBaudrate;
       
    92 		
       
    93 		// TCP remote address. Default value is 0.0.0.0 which means that remote address is not used.
       
    94 		TInetAddr iTCPRemoteAddr;
       
    95 
       
    96 	};
       
    97 
       
    98 #endif // __TTCSETTINGS_H__