voipplugins/svtlogging/inc/svtphonenumbervalidator.h
changeset 0 a4daefaec16c
equal deleted inserted replaced
-1:000000000000 0:a4daefaec16c
       
     1 /*
       
     2 * Copyright (c) 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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_SVTPHONENUMBERVALIDATOR_H
       
    21 #define C_SVTPHONENUMBERVALIDATOR_H
       
    22 
       
    23 #include <e32base.h>
       
    24 
       
    25 /**
       
    26  *  Provides services to validate phone numbers.
       
    27  *
       
    28  *  @lib svtlogging.dll
       
    29  *  @since S60 v5.1
       
    30  */
       
    31 class SvtPhoneNumberValidator
       
    32     {
       
    33 
       
    34 public:
       
    35 
       
    36     /**
       
    37      * Checks whether the given candidate presents phone number. Empty
       
    38      * candidate is considered to be invalid phone number.
       
    39      *
       
    40      * @since   S60 v5.1
       
    41      * @param   aCandidate    Phone number candidate.
       
    42      * @return  ETrue if candidate presents phone number, EFalse otherwise.
       
    43      */
       
    44     static TBool IsValidNumber( const TDesC& aCandidate );
       
    45     
       
    46 private:
       
    47     
       
    48     static TBool ContainsValidCharacters( const TDesC& aCandidate );    
       
    49     
       
    50     static TBool AreStartCharactersValid( const TDesC& aCandidate );
       
    51     };
       
    52 
       
    53 #endif // C_SVTPHONENUMBERVALIDATOR_H