voipplugins/voipadapters/provisioningfile/inc/WPProvisioningFile.h
branchRCL_3
changeset 22 d38647835c2e
parent 0 a4daefaec16c
equal deleted inserted replaced
21:f742655b05bf 22:d38647835c2e
       
     1 /*
       
     2 * Copyright (c) 2006-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:  Handles provisioning settings.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef WPPROVISIONINGFILE_H
       
    20 #define WPPROVISIONINGFILE_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include    <e32base.h>
       
    24 #include    "wpprovisioningfileconst.h"
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CWPEngine;
       
    28 class CWPOMAMsgHandler;
       
    29 class CWPProtocolProfileHandlerSIP;
       
    30 class CRepository;
       
    31     
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 *  CWPProvisioningFile handles OMA provisioning document. 
       
    36 *
       
    37 *  @lib ProvisioningFile.lib
       
    38 *  @since Series 60 3.0
       
    39 */
       
    40 NONSHARABLE_CLASS(CWPProvisioningFile) : public CBase
       
    41     {
       
    42     
       
    43 #ifdef PROVISIONINGFILE_TEST
       
    44     
       
    45     friend class UT_ProvisioningFile;
       
    46     
       
    47 #endif
       
    48     
       
    49     public:  // Constructors and destructor
       
    50         
       
    51         /**
       
    52         * Two-phased constructor.
       
    53         */
       
    54         IMPORT_C static CWPProvisioningFile* NewL( TFileName aFileName = KDefaultFilePath() );
       
    55 
       
    56         /**
       
    57         * Second two-phased constructor.
       
    58         */ 
       
    59         static CWPProvisioningFile* NewLC( TFileName aFileName );
       
    60 
       
    61         /**
       
    62         * Destructor.
       
    63         */
       
    64         virtual ~CWPProvisioningFile();
       
    65 
       
    66     public: // New functions
       
    67         
       
    68         /**
       
    69         * ProvFileContainsIapL, OMA provisioning message constains IAP.
       
    70         * @since Series 60 3.0
       
    71         * @return TBool ETrue if message contains IAP.
       
    72         */
       
    73         IMPORT_C TBool ProvFileContainsIapL();
       
    74         
       
    75         /**
       
    76         * ProvFileL, Handles OMA provisioning messages handling without IAP.
       
    77         * @since Series 60 3.0
       
    78         */
       
    79         IMPORT_C void ProvFileL();
       
    80 
       
    81         /**
       
    82         * ProvFileL, Handles OMA provisioning messages handling with IAP.
       
    83         * @since Series 60 3.0
       
    84         * @param aIapId Attach IAP to OMA message.
       
    85         */
       
    86         IMPORT_C void ProvFileL( TUint32& aIapId );
       
    87 
       
    88     private:
       
    89     
       
    90         /**
       
    91         * C++ default constructor.
       
    92         */
       
    93         CWPProvisioningFile( TFileName aFileName );
       
    94 
       
    95         /**
       
    96         * By default Symbian 2nd phase constructor is private.
       
    97         */
       
    98         void ConstructL();
       
    99         
       
   100         /**
       
   101         * InitMsgL, Read-Get-Import-Populate the provisioning document.
       
   102         * @since Series 60 3.0
       
   103         */
       
   104         void InitMsgL();
       
   105         
       
   106         /**
       
   107         * SaveDocL, Saves the provisioning document.
       
   108         * @since Series 60 3.0
       
   109         */
       
   110         void SaveDocL();
       
   111         
       
   112         /**
       
   113         * DoProvL, Do provisioning.
       
   114         * @since Series 60 3.0
       
   115         */
       
   116         void DoProvL();
       
   117         
       
   118     private:
       
   119     
       
   120         HBufC8*                         iProvisioningDoc;
       
   121         
       
   122         CWPOMAMsgHandler*               iMsgHandler;
       
   123         
       
   124         CWPProtocolProfileHandlerSIP*   iSipHandler;
       
   125         
       
   126         CWPEngine*                      iProvEngine;
       
   127         
       
   128         CRepository*                    iCenRep;
       
   129         
       
   130         TBool                           iIapAllowed;
       
   131         
       
   132         TBool                           iInitDone;
       
   133         
       
   134         TUint32                         iIapId;
       
   135         
       
   136         TFileName                       iFileName;
       
   137 
       
   138     };
       
   139 
       
   140 #endif // WPPROVISIONINGFILE_H   
       
   141              
       
   142 // End of File