wim/WimServer/inc/WimOmaProvisioning.h
changeset 0 164170e6151a
equal deleted inserted replaced
-1:000000000000 0:164170e6151a
       
     1 /*
       
     2 * Copyright (c) 2003 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:  WIM OMA Provisioning handler. 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CWIMOMAPROVISIONING_H
       
    21 #define CWIMOMAPROVISIONING_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include "Wimi.h"    // WIMI functions and definitions
       
    25 #include "ProvSC.h"  // OMA Provisioning Smart Card API types
       
    26 
       
    27 // CONSTANTS
       
    28 const TUint8 KWimProvBootstrapFileOID[]      = {0x67, 0x2B, 0x05, 0x01};
       
    29 const TUint8 KWimProvConfig1FileOID[]        = {0x67, 0x2B, 0x05, 0x02};
       
    30 const TUint8 KWimProvConfig2FileOID[]        = {0x67, 0x2B, 0x05, 0x03};
       
    31 const TInt   KWimProvFileOidLength           = 4;
       
    32 
       
    33 const TUint8 KWimProvBootstrapFileOIDTaged[] =
       
    34     {0x06, 0x04, 0x67, 0x2B, 0x05, 0x01};
       
    35 const TUint8 KWimProvConfig1FileOIDTaged[]   =
       
    36     {0x06, 0x04, 0x67, 0x2B, 0x05, 0x02};
       
    37 const TUint8 KWimProvConfig2FileOIDTaged[]   = 
       
    38     {0x06, 0x04, 0x67, 0x2B, 0x05, 0x03};
       
    39 const TInt   KWimProvFileOidLengthTaged      = 6;
       
    40 
       
    41 const TInt   KWimOidLengthTaged              = 14;
       
    42 
       
    43 const TInt KFilePathMaxLength                = 8;
       
    44 
       
    45 // FORWARD DECLARATION
       
    46 class CWimUtilityFuncs;
       
    47 
       
    48 // CLASS DECLARATION
       
    49 
       
    50 /**
       
    51 *  Class for handling OMA Provisioning files.
       
    52 *  
       
    53 *  @since Series60 2.6
       
    54 */
       
    55 class CWimOmaProvisioning : public CBase
       
    56     {
       
    57     public:  // Constructors and destructor
       
    58         
       
    59         /**
       
    60         * Two-phased constructor.
       
    61         */
       
    62         static CWimOmaProvisioning* NewL();
       
    63         
       
    64         /**
       
    65         * Destructor.
       
    66         */
       
    67         virtual ~CWimOmaProvisioning();
       
    68 
       
    69     public: // New functions
       
    70         
       
    71         /**
       
    72         * Write size of OMA provisioning file to client memory
       
    73         * @param aMessage Client message
       
    74         * @return void
       
    75         */
       
    76         void OmaFileSizeL( const RMessage2& aMessage );
       
    77 
       
    78         /**
       
    79         * Write content of OMA provisioning file to client memory
       
    80         * @param aMessage Client message
       
    81         * @return void
       
    82         */
       
    83         void OmaFileContentL( const RMessage2& aMessage );
       
    84         
       
    85     private:
       
    86 
       
    87         /**
       
    88         * C++ default constructor.
       
    89         */
       
    90         CWimOmaProvisioning();
       
    91 
       
    92         /**
       
    93         * By default Symbian 2nd phase constructor is private.
       
    94         */
       
    95         void ConstructL();
       
    96 
       
    97         /**
       
    98         * Initialize path and size member variables with values got from WIMI.
       
    99         * @return void
       
   100         */
       
   101         void InitializePathsAndSizes();
       
   102 
       
   103         /**
       
   104         * Parse size of OMA Provisioning file if not given in DODF-PROV file
       
   105         * @param aOmaType Type of file
       
   106         * @return void
       
   107         */
       
   108         void ParseFileSize( TOMAType aOmaType );
       
   109 
       
   110        
       
   111     private:    // Data
       
   112         // Reference to WIM. Not owned.
       
   113         WIMI_Ref_t*               iWimRef;
       
   114         
       
   115         // Path of bootstrap file. Length is 0 if not exists.
       
   116         TBuf8<KFilePathMaxLength> iPathBootstrap;
       
   117         
       
   118         // Path of config1 file. Length is 0 if not exists.
       
   119         TBuf8<KFilePathMaxLength> iPathConfig1;
       
   120         
       
   121         // Path of config2 file. Length is 0 if not exists.
       
   122         TBuf8<KFilePathMaxLength> iPathConfig2;
       
   123         
       
   124         // Size of Bootstrap file
       
   125         TInt                      iBootstrapFileSize;
       
   126         
       
   127         // Size of Config1 file
       
   128         TInt                      iConfig1FileSize;
       
   129         
       
   130         // Size of Config2 file
       
   131         TInt                      iConfig2FileSize;
       
   132         
       
   133         // Flag to tell if provisiong file infos are initialized
       
   134         TBool                     iFileInfosInitialized;
       
   135         
       
   136         // Pointer to CWimUtilityFuncs. Owned.
       
   137         CWimUtilityFuncs*         iWimUtilityFuncs;
       
   138     };
       
   139 
       
   140 #endif      // CWIMOMAPROVISIONING_H
       
   141     
       
   142 // End of File