dbcreator/inc/cdccommsdatcreator.h
changeset 0 5a93021fdf25
child 18 fcbbe021d614
child 57 05bc53fe583b
equal deleted inserted replaced
-1:000000000000 0:5a93021fdf25
       
     1 /*
       
     2 * Copyright (c) 2004-2007 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:   Declaration of cdccommsdatcreator class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef COMMSDAT_CREATOR_H
       
    22 #define COMMSDAT_CREATOR_H
       
    23 
       
    24 // INCLUDE FILES
       
    25 #include <e32base.h>
       
    26 #include <bacline.h>
       
    27 #include <f32file.h>
       
    28 
       
    29 #include <cmmanagerext.h>
       
    30 
       
    31 
       
    32 // CONSTANTS
       
    33 
       
    34 
       
    35 // DATA TYPES
       
    36 
       
    37 
       
    38 // FORWARD DECLARATIONS
       
    39 class RCmConnectionMethodExt;
       
    40 class RCmDestinationExt;
       
    41 class CReaderBase;
       
    42 class CProcessorBase;
       
    43 class CEapTypeElement;
       
    44 class CLingerElement;
       
    45 
       
    46 // CLASS DECLARATION
       
    47 
       
    48 
       
    49 /**
       
    50 * Creates CommsDat database from the input XML file.
       
    51 * Writes the content of the CommsDat to CSV output file.
       
    52 */
       
    53 class CCdcCommsDatCreator: public CBase
       
    54     {
       
    55 
       
    56     public:
       
    57 
       
    58         /** Epoc constructors */
       
    59         IMPORT_C static CCdcCommsDatCreator* NewL();
       
    60         IMPORT_C static CCdcCommsDatCreator* NewLC();
       
    61     
       
    62         IMPORT_C void CreateCommsDatL( const TFileName& aInFileName );
       
    63 
       
    64         IMPORT_C void DumpCommsDatL( const TFileName& aOutFileName );
       
    65 
       
    66         IMPORT_C void CreateTablesL();
       
    67 
       
    68 
       
    69         /** Destructor */
       
    70 	    IMPORT_C virtual ~CCdcCommsDatCreator();
       
    71         
       
    72     private:
       
    73     
       
    74         /** First stage constructor */
       
    75         CCdcCommsDatCreator();
       
    76     
       
    77         /** Epoc constructor */
       
    78         void ConstructL(); // second-phase constructor
       
    79         
       
    80         /**
       
    81         * InputFileType
       
    82         * @return TDbCreatorInputFile
       
    83         *    EFileUnknown     ///< Unrecognized
       
    84         *    EFileCSV         ///< CSV file
       
    85         *    EFileXML         ///< XML file
       
    86         */
       
    87         TUint InputFileType ( const TFileName& aInFileName );
       
    88 
       
    89         void LogIapIdsL();
       
    90                       
       
    91         void UpdateUncatCmsL( RArray< TBool >& aCmInDest );
       
    92                       
       
    93         template<class T> void ProcessPluginL();
       
    94         
       
    95         void ProcessDNL( RArray< TBool >& aCmInDest, TBool aFirstRound );
       
    96 
       
    97         void SetUnderlyingIapL( RPointerArray< HBufC >& aUnderLying );
       
    98 
       
    99         void SetDefaultConnectionL( RPointerArray< HBufC >& aDefCon );
       
   100         
       
   101         void SetWlanSecurityL( RPointerArray< HBufC >& aWlanSecurity );
       
   102         
       
   103         void SetLingerSettingsL( RPointerArray< CLingerElement >& aLingerSettings );
       
   104                       
       
   105         TBool iIsWlanS;
       
   106         
       
   107         RPointerArray< RCmDestinationExt > iDestArray;
       
   108         RPointerArray< HBufC > iDestNames;
       
   109         RPointerArray< RCmConnectionMethodExt > iPluginArray;
       
   110         RPointerArray< HBufC > iPluginNames;
       
   111         RPointerArray< CEapTypeElement > iEapSettings;
       
   112 		RPointerArray< HBufC > iUnderLying;
       
   113     	RPointerArray< HBufC > iDefCon;
       
   114     	RPointerArray< HBufC > iWlanSecurity;
       
   115     	RPointerArray< CLingerElement > iLingerSettings;
       
   116     	RArray< TBool > iCmInDest;
       
   117     
       
   118         RCmManagerExt iCmManager;
       
   119         
       
   120         CReaderBase* iReader;
       
   121 
       
   122         CProcessorBase* iFileProcessor;
       
   123 
       
   124     };
       
   125 
       
   126 #endif   // COMMSDAT_CREATOR_H
       
   127