vmbx/vmbxengine/inc/vmbxutilities.h
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
child 21 0a6dd2dc9970
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
     1 /*
       
     2 * Copyright (c) 2009-2010 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:  Utility methods for universal usage
       
    15 *  Interface   : Private, VmbxUtilities
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef VMBXUTILITIES_H
       
    21 #define VMBXUTILITIES_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <voicemailboxdefs.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32 *  Implementation of the auxiliary methods for the VMBX engine classes
       
    33 *
       
    34 *  @lib vmbxengine.lib
       
    35 */
       
    36 NONSHARABLE_CLASS(  VmbxUtilities )
       
    37     {
       
    38 
       
    39 public:  // New functions
       
    40 
       
    41     /**
       
    42      * Verifies that the given string is a valid phone number.
       
    43      * Rules:
       
    44      * - '+' is only allowed as the first character
       
    45      * - The phone number part must be between 3-40 digits
       
    46      *
       
    47      * @param in aNumber Vmbx number
       
    48      * @return ETrue if valid number
       
    49      */
       
    50     static TBool IsValidPhoneNumber( const TDesC& aNumber );
       
    51 
       
    52     /**
       
    53     /**
       
    54      * Returns active ALS
       
    55      *
       
    56      * @return Active ALS line
       
    57      */
       
    58     static TVmbxAlsLineType AlsLine();
       
    59 
       
    60     /**
       
    61      * Returns state of the video support
       
    62      *
       
    63      * @return ETrue if Video supported
       
    64      */
       
    65     static TBool VideoSupported();
       
    66 
       
    67     /**
       
    68      * Returns state of the VoIP Support
       
    69      *
       
    70      * @return ETrue if VoIP Supported
       
    71      */
       
    72     static TBool VoIPSupported();
       
    73 
       
    74     /**
       
    75      * Verifies that the given number is not an emergency number.
       
    76      *
       
    77      * @param in aNumber Mailbox number
       
    78      * @return ETrue if emergency number
       
    79      */
       
    80     static TBool IsEmergencyNumber( const TDesC& aNumber );
       
    81 
       
    82 private:
       
    83 
       
    84     /**
       
    85      * Verifies that the given string is a valid Tel number.
       
    86      *
       
    87      * @param in aLexer string to be validate
       
    88      * @return ETrue if tel number validate
       
    89      */
       
    90     static TBool ValidateTelNum( TLex& aLexer );
       
    91 
       
    92     /**
       
    93      * Verifies that the given string is a valid DTMF number.
       
    94      *
       
    95      * @param in aLexer string to be validate
       
    96      * @return ETrue if DTMf validate
       
    97      */
       
    98     static TBool ValdateDtmfPart( TLex& aLexer );
       
    99 
       
   100     };
       
   101 
       
   102 #endif    // VMBXUTILITIES_H