wvuing/IMPSConnectionUI/ServiceInc/CnUiIMPSIdValidator.h
branchRCL_3
changeset 13 a941bc465d9f
parent 0 094583676ce7
equal deleted inserted replaced
12:6ca72c0fe49a 13:a941bc465d9f
       
     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:  Validator to check the IMPS id correctness.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __CNUIIMPSIDVALIDATOR_H
       
    19 #define __CNUIIMPSIDVALIDATOR_H
       
    20 
       
    21 
       
    22 //  INCLUDES
       
    23 #include <E32Std.h>
       
    24 
       
    25 
       
    26 // CLASS DECLARATION
       
    27 /**
       
    28  * Validator to check the IMPS id correctness.
       
    29  *
       
    30  * @since 2.1
       
    31  */
       
    32 NONSHARABLE_CLASS( CnUiIMPSIdValidator )
       
    33     {
       
    34 public: // New functions
       
    35 
       
    36     /**
       
    37      * Validates given IMPS login id.
       
    38      *
       
    39      * Checks is the given IMPS id a valid login
       
    40      * id or not. Assumes the IMPS id to be a WV id.
       
    41      *
       
    42      * Checks the following details from the IMPS (WV) id:
       
    43      * - forbidden characters
       
    44      * - user part format
       
    45      * - domain part format
       
    46      * - id not too long
       
    47      *
       
    48      * @since 2.1
       
    49      * @param aImpsId The IMPS id to check.
       
    50      * @return ETrue if the id is a valid login id.
       
    51      * Else EFalse.
       
    52      */
       
    53     static TBool ValidLoginIdL( const TDesC& aImpsId );
       
    54 
       
    55 private: // helper method
       
    56     /**
       
    57      * Validates given IMPS login id.
       
    58      *
       
    59      * Checks the given IMPS id for forbidden characters
       
    60      *
       
    61      * @since 3.0
       
    62      * @param aImpsId The IMPS id to check.
       
    63      * @return ETrue if the id is a valid login id.
       
    64      * Else EFalse.
       
    65      */
       
    66     static TBool ForbiddenChars( const TDesC& aImpsId );
       
    67 
       
    68 
       
    69 private: //prohibited constructors / destructors
       
    70     CnUiIMPSIdValidator();
       
    71     ~CnUiIMPSIdValidator();
       
    72     };
       
    73 
       
    74 #endif      // __CNUIIMPSIDVALIDATOR_H
       
    75 
       
    76 // End of File