phoneclientserver/EnPolicy/Src/SosEnPolicy/CSosEmergencyNumberPolicyManager.cpp
changeset 0 ff3b6d0fd310
child 19 7d48bed6ce0c
equal deleted inserted replaced
-1:000000000000 0:ff3b6d0fd310
       
     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:  Provides SOS emergency number policy API to verify an emergency
       
    15 *                number.        
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 // INCLUDE FILES
       
    22 #include "CSOSEmergencyNumberPolicyManager.h"
       
    23 #include "CSOSEmergencyNumberPolicyHandler.h"
       
    24 
       
    25 
       
    26 // ============================ MEMBER FUNCTIONS ===============================
       
    27 
       
    28 // -----------------------------------------------------------------------------
       
    29 // CSosEmergencyNumberPolicyManager::~CSosEmergencyNumberPolicyManager()
       
    30 // -----------------------------------------------------------------------------
       
    31 //
       
    32 CSosEmergencyNumberPolicyManager::~CSosEmergencyNumberPolicyManager()
       
    33     { 
       
    34     delete iSosEnPolicyHandler;
       
    35     }
       
    36 
       
    37 // -----------------------------------------------------------------------------
       
    38 // CSosEmergencyNumberPolicyManager::ConstructL()
       
    39 // -----------------------------------------------------------------------------
       
    40 //
       
    41 void CSosEmergencyNumberPolicyManager::ConstructL( RTelServer& aETelServer )
       
    42     {
       
    43     iSosEnPolicyHandler = CSosEmergencyNumberPolicyHandler::NewL( aETelServer);
       
    44     }
       
    45 
       
    46 // -----------------------------------------------------------------------------
       
    47 // CSosEmergencyNumberPolicyManager::IsEmergencyNumber
       
    48 // 
       
    49 // -----------------------------------------------------------------------------
       
    50 //
       
    51 TInt CSosEmergencyNumberPolicyManager::IsEmergencyNumber ( 
       
    52                                     TPhCltTelephoneNumber& aTelNumber, 
       
    53                                     TPhCltEmergencyNumberQueryMode aMode,
       
    54                                     TBool& aIsEmergencyNumber )
       
    55     {       
       
    56     return iSosEnPolicyHandler->IsEmergencyNumber( aTelNumber, 
       
    57                                                    aMode, 
       
    58                                                    aIsEmergencyNumber );
       
    59     }
       
    60 
       
    61 // ========================== OTHER EXPORTED FUNCTIONS =========================
       
    62 
       
    63 // -----------------------------------------------------------------------------
       
    64 // NewEnPolicy()
       
    65 // 
       
    66 // -----------------------------------------------------------------------------
       
    67 //
       
    68 EXPORT_C CEmergencyNumberPolicy* NewEnPolicyL()
       
    69     {
       
    70     return new (ELeave) CSosEmergencyNumberPolicyManager;
       
    71     }
       
    72 
       
    73 // End of file