richcallsettingsengine/rcse2/src/crcseprofileentry.cpp
branchRCL_3
changeset 21 f742655b05bf
parent 20 65a3ef1d5bd0
child 22 d38647835c2e
equal deleted inserted replaced
20:65a3ef1d5bd0 21:f742655b05bf
     1 /*
       
     2 * Copyright (c) 2002-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:  Profile entry, which is stored to cenrep
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include	<featmgr.h>
       
    22 
       
    23 #include    "crcseprofileentry.h"
       
    24 #include    "rcsedefaults.h"
       
    25 
       
    26 // ============================ MEMBER FUNCTIONS ===============================
       
    27 
       
    28 // -----------------------------------------------------------------------------
       
    29 // CRCSEProfile::NewL
       
    30 // Two-phased constructor.
       
    31 // -----------------------------------------------------------------------------
       
    32 //
       
    33 EXPORT_C CRCSEProfileEntry* CRCSEProfileEntry::NewL()
       
    34     {
       
    35     CRCSEProfileEntry* self = NewLC();
       
    36     CleanupStack::Pop( self );
       
    37     return self;
       
    38     }
       
    39 
       
    40 // -----------------------------------------------------------------------------
       
    41 // CRCSEProfile::NewLC
       
    42 // Two-phased constructor.
       
    43 // -----------------------------------------------------------------------------
       
    44 //
       
    45 EXPORT_C CRCSEProfileEntry* CRCSEProfileEntry::NewLC()
       
    46     {
       
    47     CRCSEProfileEntry* self = new (ELeave) CRCSEProfileEntry();
       
    48     CleanupStack::PushL( self );
       
    49     self->ConstructL();
       
    50     self->ResetDefaultValues();
       
    51     return self;
       
    52     }
       
    53 
       
    54 // -----------------------------------------------------------------------------
       
    55 // CRCSEProfileEntry::ConstructL
       
    56 // Symbian 2nd phase constructor can leave.
       
    57 // -----------------------------------------------------------------------------
       
    58 //
       
    59 void CRCSEProfileEntry::ConstructL()
       
    60     {
       
    61     // Check VoIP support from feature manager
       
    62     FeatureManager::InitializeLibL();
       
    63     TBool support = FeatureManager::FeatureSupported( KFeatureIdCommonVoip );
       
    64     FeatureManager::UnInitializeLib();
       
    65     if (!support)
       
    66         {
       
    67         User::Leave(KErrNotSupported);
       
    68         }
       
    69     }
       
    70 
       
    71 // -----------------------------------------------------------------------------
       
    72 // CRCSEProfileEntry::CRCSEProfileEntry
       
    73 // C++ default constructor can NOT contain any code, that
       
    74 // might leave.
       
    75 // -----------------------------------------------------------------------------
       
    76 //
       
    77 CRCSEProfileEntry::CRCSEProfileEntry()
       
    78     {
       
    79     }
       
    80     
       
    81 // Destructor
       
    82 EXPORT_C CRCSEProfileEntry::~CRCSEProfileEntry()
       
    83     {
       
    84     iIds.Reset();
       
    85     iIds.Close();
       
    86     iPreferredCodecs.Reset();
       
    87     iPreferredCodecs.Close();
       
    88     }
       
    89     
       
    90 // -----------------------------------------------------------------------------
       
    91 // CRCSEProfileEntry::ResetDefaultValues
       
    92 // Resets profile entry to default settings.
       
    93 // (other items were commented in a header).
       
    94 // -----------------------------------------------------------------------------
       
    95 //
       
    96 void CRCSEProfileEntry::ResetDefaultValues()
       
    97     {
       
    98     iIds.Reset();
       
    99     
       
   100     iId                 = 0;
       
   101     iProviderName       = KRCSEDefaultProviderName;
       
   102     iSettingsName       = KRCSEDefaultSettingsName;
       
   103     
       
   104     // Codecs
       
   105     iPreferredCodecs.Reset();
       
   106     
       
   107     iStartMediaPort     = KRCSEDefaultStartMediaPort;
       
   108     iEndMediaPort       = KRCSEDefaultEndMediaPort;
       
   109     iSiqnalingQOS       = KRCSEDefaultSiqnalingQOS;
       
   110     iMediaQOS           = KRCSEDefaultMediaQOS;
       
   111     iInbandDTMF         = KRCSEDefaultInbandDTMF;
       
   112     iOutbandDTMF        = KRCSEDefaultOutbandDTMF;
       
   113     iHoldRingBack       = KRCSEDefaultHoldRingBack;
       
   114     iAutoComplete       = KRCSEDefaultAutoComplete;
       
   115     iCFNoAnswer         = KRCSEDefaultCFNoAnswer;
       
   116     iCFBusy             = KRCSEDefaultCFBusy;
       
   117     iCFUnconditional    = KRCSEDefaultCFUnconditional;
       
   118     iRedundancy         = KRCSEDefaultRedundancy;   
       
   119     iSecureCallPreference   = KRCSEDefaultSecureCallPreference;
       
   120     iVoIPProfileLock        = KRCSEDefaultVoIPProfileLock;
       
   121     iAdhocAllowed           = KRCSEDefaultAdhocAllowed;
       
   122     iSIPServerType          = KRCSEDefaultSIPServerType;
       
   123     iSBCType                = KRCSEDefaultSBCType;
       
   124     iSTUNServerType         = KRCSEDefaultSTUNServerType;
       
   125     iWLANAPType             = KRCSEDefaultWLANAPType;
       
   126     iPSTNGatewayType        = KRCSEDefaultPSTNGatewayType;
       
   127     iSecurityGatewayType    = KRCSEDefaultSecurityGatewayType;
       
   128     iRTCP                   = KRCSEDefaultRTCP;
       
   129     iSIPVoIPUAHTerminalType = KRCSEDefaultSIPVoIPUAHTerminalType;
       
   130     iSIPVoIPUAHeaderWLANMAC = KRCSEDefaultSIPVoIPUAHeaderWLANMAC;
       
   131     iSIPVoIPUAHeaderString  = KRCSEDefaultSIPVoIPUAHeaderString;
       
   132     iProfileLockedToIAP     = KRCSEDefaultProfileLockedToIAP;
       
   133     iVoIPPluginUID          = KRCSEDefaultVoIPPluginUID;
       
   134     iAllowVoIPoverWCDMA     = KRCSEDefaultAllowVoIPoverWCDMA;
       
   135     iAllowVoIPoverBT        = KRCSEDefaultAllowVoIPoverBT;
       
   136     iMeanCountOfVoIPDigits  = KRCSEDefaultMeanCountOfVoIPDigits;
       
   137     iIgnoreAddrDomainPart   = KRCSEDefaultIgnoreAddrDomainPart;
       
   138 
       
   139     iHandoverDialect            = KRCSEDefHandoverDialect;
       
   140     iPSTelephonyHOPreference    = KRCSEDefPSTelephonyHOPreference;
       
   141     iHOThresholdValueLL         = KRCSEDefHOThresholdValueLL;
       
   142     iHOThresholdValueHL         = KRCSEDefHOThresholdValueHL;
       
   143     iNumberOfMeasurementsAbove  = KRCSEDefNumberOfMeasurementsAbove;
       
   144     iNumberOfMeasurementsBelow  = KRCSEDefNumberOfMeasurementsBelow;
       
   145     iSmartScannInterParaHigh    = KRCSEDefSmartScannInterParaHigh;
       
   146     iSmartScannInterParaMedium  = KRCSEDefSmartScannInterParaMedium;
       
   147     iSmartScannInterParaLow     = KRCSEDefSmartScannInterParaLow;
       
   148     iSmartScannInterParaStatic  = KRCSEDefSmartScannInterParaStatic;
       
   149 
       
   150     iSmartScannDurationHighMode     = KRCSEDefSmartScannDurationHighMode;
       
   151     iSmartScannDurationMediumMode   = KRCSEDefSmartScannDurationMediumMode;
       
   152     iSmartScannDurationLowMode      = KRCSEDefSmartScannDurationLowMode;
       
   153     iHandoffNumber                  = KRCSEDefHandoffNumber;
       
   154     iHandbackNumber                 = KRCSEDefHandbackNumber;
       
   155     iHysterisisTimer                = KRCSEDefHysterisisTimer;
       
   156     iHandOffProcessTimer            = KRCSEDefHandOffProcessTimer;
       
   157     iDisconnectProcessTimer         = KRCSEDefDisconnectProcessTimer;
       
   158     iHandoffPrefix                  = KRCSEHandoffPrefix;
       
   159     iHandbackPrefix                 = KRCSEHandbackPrefix;
       
   160     iHandoverTones                  = KRCSEDefHandoverTones;
       
   161     iSupportSMSoverWLAN             = KRCSEDefSupportSMSoverWLAN;
       
   162 
       
   163     iServiceProviderId              = KRCSEDefServiceProviderId;
       
   164     iUserPhoneUriParameter          = KRCSEDefUserPhoneUriParam;
       
   165     iSIPConnTestAddress             = KRCSEDefSIPConnTestAddress;
       
   166     iNATSettingsStorageId           = KRCSEDefNATSettingsStorageId;
       
   167     iSIPMinSE                       = KRCSEDefSIPMinSE;
       
   168     iSIPSessionExpires              = KRCSEDefSIPSessionExpires;
       
   169     iNATProtocol                    = KRCSEDefNATProtocol;
       
   170     iNewServiceTableEntry           = KRCSENewServiceTableEntry;
       
   171     iSNAPId                         = KRCSEDefSNAPId;
       
   172     }
       
   173 
       
   174 //  End of File