omaprovisioning/provisioning/IMAdapter/Inc/WPIMUtil.h
changeset 73 ae69c2e8bc34
parent 71 d2517372cc44
child 77 9f85c58c0592
equal deleted inserted replaced
71:d2517372cc44 73:ae69c2e8bc34
     1 /*
       
     2 * Copyright (c) 2002 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 *     Utility class for reading resource strings.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef WPIMUTIL_H
       
    21 #define WPIMUTIL_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <impssapsettings.h>
       
    26 
       
    27 // CONSTANTS
       
    28 #if ( defined (__WINS__) || defined (__WINSCW) ) // this different on hw
       
    29     _LIT( KWVAdapterName, "WPWVAdapterResource" );
       
    30 #else
       
    31     _LIT( KWVAdapterName, "WPWVAdapter" );
       
    32 #endif
       
    33 _LIT( KIMAppID1, "wa" );
       
    34 _LIT( KIMAppID2, "wA" );
       
    35 _LIT( KServicesName, "SERVICES");
       
    36 _LIT( KIMName, "IM");
       
    37 _LIT( KPresenceName, "PR");
       
    38 
       
    39 const TUint32 KNotSet = 0xffffffff;
       
    40 
       
    41 // FORWARD DECLARATIONS
       
    42 class RResourceFile;
       
    43 class CWPCharacteristic;
       
    44 // CLASS DECLARATION
       
    45 
       
    46 /**
       
    47  * TData stores settings.
       
    48  */
       
    49 class TData
       
    50 	{
       
    51 	public:
       
    52 	    
       
    53 	    /**
       
    54         * C++ default constructor.
       
    55         */
       
    56 		TData();
       
    57 		
       
    58 		/**
       
    59         * Destructor.
       
    60         */
       
    61 		virtual ~TData();
       
    62 		
       
    63 	public: // data, nothing owned
       
    64 		TPtrC                               iName;
       
    65 		TPtrC                               iURL;
       
    66 		TPtrC                               iUserID;
       
    67 		TPtrC                               iPassword;
       
    68 		RPointerArray<CWPCharacteristic>    iLinks;
       
    69 		TPckgBuf<TUint32>                   iSAPId;
       
    70 		TIMPSAccessGroup                    iProvLocation;
       
    71 	};
       
    72 
       
    73 /**
       
    74  * WPIMUtil is a utility class for reading resource strings.
       
    75  *
       
    76  * @lib WPIMAdapter
       
    77  * @since 2.0
       
    78  */ 
       
    79 class WPIMUtil
       
    80 	{
       
    81 	public: // New functions
       
    82 
       
    83         /**
       
    84         * Check does the given descriptor contain any illegal character
       
    85         * from 0x00 to 0x1F.
       
    86         * @param aDes Descritor to be checked
       
    87         * @return TBool Did the descriptor contain any illegal chars
       
    88         */
       
    89         static TBool HasIllegalChars( const TDesC& aDes );
       
    90 			
       
    91         static TUint32 FindGPRSL( RPointerArray<CWPCharacteristic>& aLinks );
       
    92         
       
    93         /**
       
    94         * Checks the validity of current data
       
    95         * @return TBool was the settings data valid or not.
       
    96         */
       
    97         static TBool IsValid( TData* aCurrentData );
       
    98 
       
    99 	};
       
   100 
       
   101 #endif	// WPWAPUTIL_H
       
   102             
       
   103 // End of File