vmbx/vmbxengine/inc/vmbxutilities.h
changeset 12 ae8abd0db65c
child 19 e44a8c097b15
equal deleted inserted replaced
0:ff3b6d0fd310 12:ae8abd0db65c
       
     1 /*
       
     2 * Copyright (c) 2009 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 *  @since S60 v5.2
       
    36 */
       
    37 NONSHARABLE_CLASS(  VmbxUtilities )
       
    38     {
       
    39 
       
    40 public:  // New functions
       
    41 
       
    42     /**
       
    43      * Verifies that the given string is a valid phone number.
       
    44      * Rules:
       
    45      * - '+' is only allowed as the first character
       
    46      * - The phone number part must be between 3-40 digits
       
    47      *
       
    48      * @since S60 v5.2
       
    49      * @param in aNumber Vmbx number
       
    50      * @return ETrue if valid number
       
    51      */
       
    52     static TBool IsValidPhoneNumber( const TDesC& aNumber );
       
    53 
       
    54     /**
       
    55     /**
       
    56      * Returns active ALS
       
    57      *
       
    58      * @since S60 v5.2
       
    59      * @return Active ALS line
       
    60      */
       
    61     static TVmbxAlsLineType AlsLine();
       
    62 
       
    63     /**
       
    64      * Returns state of the video support
       
    65      *
       
    66      * @since S60 v5.2
       
    67      * @return ETrue if Video supported
       
    68      */
       
    69     static TBool VideoSupported();
       
    70 
       
    71     /**
       
    72      * Returns state of the VoIP Support
       
    73      *
       
    74      * @since S60 v5.2
       
    75      * @return ETrue if VoIP Supported
       
    76      */
       
    77     static TBool VoIPSupported();
       
    78 
       
    79     /**
       
    80      * Verifies that the given number is not an emergency number.
       
    81      *
       
    82      * @since S60 v5.2
       
    83      * @param in aNumber Mailbox number
       
    84      * @return ETrue if emergency number
       
    85      */
       
    86     static TBool IsEmergencyNumber( const TDesC& aNumber );
       
    87 
       
    88 private:
       
    89 
       
    90     /**
       
    91      * Verifies that the given string is a valid SS.
       
    92      *
       
    93      * @since S60 v5.2
       
    94      * @param in&out aLexer string to be validate
       
    95      * @return ETrue if supplementary service code validate
       
    96      */
       
    97     static TBool ValidateSsNum( TLex& aLexer );
       
    98 
       
    99     /**
       
   100      * Verifies that the given string is a valid Tel number.
       
   101      *
       
   102      * @since S60 v5.2
       
   103      * @param in aLexer string to be validate
       
   104      * @return ETrue if tel number validate
       
   105      */
       
   106     static TBool ValidateTelNum( TLex& aLexer );
       
   107 
       
   108     /**
       
   109      * Verifies that the given string is a valid DTMF number.
       
   110      *
       
   111      * @since S60 v5.2
       
   112      * @param in aLexer string to be validate
       
   113      * @return ETrue if DTMf validate
       
   114      */
       
   115     static TBool ValdateDtmfPart( TLex& aLexer );
       
   116 
       
   117     };
       
   118 
       
   119 #endif  // VMBXUTILITIES_H