telephonyserverplugins/multimodetsy/hayes/TSYCONFG.H
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // TSY Configuration Class Header
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalAll 
       
    21 */
       
    22 
       
    23 #ifndef __TSYCONFG_H
       
    24 #define __TSYCONFG_H
       
    25 
       
    26 #include <e32base.h>
       
    27 #include <d32comm.h>
       
    28 #include <etelmm.h>
       
    29 
       
    30 #include <commsdattypesv1_1.h>
       
    31 using namespace CommsDat;
       
    32 
       
    33 // 
       
    34 // CTsyConfig Class
       
    35 // Creating the class will load the current modem settings.
       
    36 // They may be refreshed by calling ReloadSettings.
       
    37 // The ModemName, PortDriverName, CommPortName and String functions 
       
    38 // will return descriptors to the relevant settings taken from 
       
    39 // the current modem's settings.
       
    40 // The CommConfig function will return a reference to the Configuration 
       
    41 // structure in the current modem's settings.  
       
    42 // All these retrieval functions should return NULL if there is an error.
       
    43 // If there is an error ReloadingSettings it should be returned in the TInt.
       
    44 // All file closing, tidying and memory deallocation should be done 
       
    45 // in the ~CTsyConfig destructor.
       
    46 //
       
    47 /**
       
    48 @internalComponent
       
    49 */
       
    50 enum TConfigType
       
    51 	{
       
    52 	EConfigTypePreInit,
       
    53 	EConfigTypeInit,
       
    54 	EConfigTypeConnect,
       
    55 	EConfigTypeHangUp,
       
    56 	EConfigTypeFull,
       
    57 	EConfigTypeQuickInit,
       
    58 	EConfigTypeDDBugWorkAroundStart,
       
    59 	EConfigTypeDDBugWorkAroundEnd
       
    60 	};
       
    61 
       
    62 /**
       
    63 @internalComponent
       
    64 */
       
    65 const TInt KInternetAccessPoint=1;
       
    66 
       
    67 
       
    68 class CTsyConfig : public CBase
       
    69 /**
       
    70 @internalComponent
       
    71 */
       
    72 	{
       
    73 //	friend class CDefaultRecordChangeNotifier;
       
    74 public:
       
    75 	static CTsyConfig* NewL(TBool aManual =EFalse);
       
    76 	~CTsyConfig();
       
    77 
       
    78 	TInt ConfigModemString(const TDesC& aStringTag,TDes8& aString);
       
    79 	TInt ConfigModemString(const TDesC& aStringTag,TDes16& aString);
       
    80 	TInt PortConfig(TCommConfig& aConfigPckg,TConfigType aConfigType);
       
    81 	void GetIntervalPref(TInt& aInterval);
       
    82 	void GetSpeakerSettingPref(RCall::TMonitorSpeakerControl& aSpeakerSetting);
       
    83 	void GetSpeakerVolumePref(RCall::TMonitorSpeakerVolume& aSpeakerVolume);
       
    84 	void GetWaitForDialTonePref(RCall::TWaitForDialTone& aWaitForDialTonePref);
       
    85 	void GetCurrentTableViewsL();
       
    86 	void GetLocationModemSettingsL();
       
    87 	void ResetCurrentTableViews(TBool aForceErase=EFalse);
       
    88 	void GetRequestedTableViewsL();
       
    89 	void SetTableViewsL(RMobilePhone::TMMTableSettings& aMMTableSettings);
       
    90 
       
    91 protected:
       
    92 	void CommConfigL(TCommConfigV01& aConfig);
       
    93 private:
       
    94 	// Private object construction methods
       
    95 	CTsyConfig();
       
    96 	void ConstructL(TBool aExplicit);
       
    97 
       
    98 	// Private utility methods
       
    99 //	TBool ModemTableUsesMMTSYL(const TUint32& aModemId);
       
   100  	void GetModemBearerIdL(TUint32& aBearerId); 
       
   101  	void GetLocationIdL(const TUint32& aBearerId, TUint32& aLocationId); 
       
   102 
       
   103 	TInt ConfigModemStringL(const TDesC& aStringTag,TDes8& aString);
       
   104 	TInt ConfigModemStringL(const TDesC& aStringTag,TDes16& aString);
       
   105 
       
   106 private:
       
   107 	TCommConfigV01 iConfig;
       
   108 	CMDBSession* iDbSession;
       
   109 	TUint32 iModemBearer;
       
   110 	TUint32 iLocationId;
       
   111 	TBool iManualConfigMode;
       
   112 	RMobilePhone::TMMTableSettings iMMTableSettings;
       
   113 
       
   114 	TInt iInterval;
       
   115 	RCall::TMonitorSpeakerControl iSpeakerSetting;
       
   116 	RCall::TMonitorSpeakerVolume iSpeakerVolume;
       
   117 	RCall::TWaitForDialTone iWaitForDialTonePref;
       
   118 	};
       
   119 
       
   120 #endif