messagingfw/msgcommonutils/src/MsgVoIPExtensionwithvoip.cpp
branchRCL_3
changeset 22 d2c4c66342f3
equal deleted inserted replaced
21:e5b3a2155e1a 22:d2c4c66342f3
       
     1 /*
       
     2 * Copyright (c) 2005, 2007-2008 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:   Get count of VoIP profiles.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "MsgVoIPExtension.h"
       
    20 
       
    21 #include <spsettings.h>
       
    22 
       
    23 // ================= MEMBER FUNCTIONS =======================
       
    24 
       
    25 // C++ default constructor can NOT contain any code, that
       
    26 // might leave.
       
    27 //
       
    28 CMsgVoIPExtension::CMsgVoIPExtension()
       
    29     {
       
    30     }
       
    31 
       
    32 // Two-phased constructor.
       
    33 //
       
    34 EXPORT_C CMsgVoIPExtension* CMsgVoIPExtension::NewL()
       
    35     {
       
    36     CMsgVoIPExtension *self =
       
    37         new ( ELeave ) CMsgVoIPExtension();
       
    38     CleanupStack::PushL( self );
       
    39     self->ConstructL();
       
    40     CleanupStack::Pop();
       
    41     return self;
       
    42     }
       
    43 
       
    44 // ConstructL
       
    45 //
       
    46 void CMsgVoIPExtension::ConstructL()
       
    47     {
       
    48     // for handling services related data
       
    49     iSPSettings = CSPSettings::NewL();
       
    50     }
       
    51 
       
    52 // Destructor
       
    53 //
       
    54 CMsgVoIPExtension::~CMsgVoIPExtension()
       
    55     {
       
    56     delete iSPSettings;
       
    57     }
       
    58 
       
    59 // ----------------------------------------------------
       
    60 // CMsgVoIPExtension::VoIPProfilesExistL
       
    61 //
       
    62 // ----------------------------------------------------
       
    63 EXPORT_C TBool CMsgVoIPExtension::VoIPProfilesExistL() const
       
    64     {
       
    65     return iSPSettings->IsFeatureSupported( ESupportVoIPFeature ) &&
       
    66            iSPSettings->IsFeatureSupported( ESupportInternetCallFeature );
       
    67     }
       
    68 
       
    69 // ----------------------------------------------------
       
    70 // CMsgVoIPExtension::IsPreferredTelephonyVoIP
       
    71 // 
       
    72 // ----------------------------------------------------
       
    73 EXPORT_C TBool CMsgVoIPExtension::IsPreferredTelephonyVoIP() const
       
    74     {
       
    75     return EFalse;
       
    76     }
       
    77 
       
    78 // ----------------------------------------------------
       
    79 // CMsgVoIPExtension::IsVoIPSupported
       
    80 // 
       
    81 // ----------------------------------------------------
       
    82 EXPORT_C TBool CMsgVoIPExtension::IsVoIPSupported() const
       
    83     {
       
    84     return iSPSettings->IsFeatureSupported( ESupportVoIPFeature );
       
    85     }
       
    86 
       
    87 //  End of File