pnpmobileservices/pnpms/PnP/PnpProvisioningAppInc/PnpProvisioningDocument.h
changeset 0 3ce708148e4d
equal deleted inserted replaced
-1:000000000000 0:3ce708148e4d
       
     1 /*
       
     2 * Copyright (c) 2004-2006 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: Implementation of PnPMS components
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef PNPPROVISIONINGDOCUMENT_H
       
    21 #define PNPPROVISIONINGDOCUMENT_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <AknDoc.h>
       
    25 #include "HttpProvStates.h"
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class  CEikAppUi;
       
    31 class  CPnpProvisioningAppUi;
       
    32 class  CNHeadWrapperParser;
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36 *  CPnpProvisioningDocument application class.
       
    37 */
       
    38 class CPnpProvisioningDocument : public CAknDocument
       
    39     {
       
    40     public: // Constructors and destructor
       
    41         /**
       
    42         * Two-phased constructor.
       
    43         */
       
    44         static CPnpProvisioningDocument* NewL(CEikApplication& aApp);
       
    45 
       
    46         /**
       
    47         * Destructor.
       
    48         */
       
    49         virtual ~CPnpProvisioningDocument();
       
    50 
       
    51     public: // New functions
       
    52 
       
    53         /**
       
    54         * Handles provisioning file
       
    55         */
       
    56         void HandleFileL(TBool aDoOpen,const TDesC& aFilename,RFs& aFs);
       
    57         void DoHandleFileL( RFile& aFile );
       
    58 
       
    59         /**
       
    60         * Saves settings
       
    61         */
       
    62         THttpProvStates::TProvisioningStatus SaveSettingsL();
       
    63 
       
    64         inline TBool Ready() { return(iReady); }
       
    65 
       
    66         /**
       
    67         * Get report url
       
    68         */
       
    69         const TDesC8& GetReportUrlL(); 
       
    70 
       
    71     public: // Functions from base classes
       
    72         
       
    73         /**
       
    74         * From CApaDocument: This is called by framework to restore saved data
       
    75         * from persistent store to document
       
    76         */
       
    77         void RestoreL(const CStreamStore& aStore, const CStreamDictionary& aStreamDic);
       
    78 
       
    79         /**
       
    80         * From CApaDocument: This is called by framework to store data
       
    81         * to persistent store
       
    82         */
       
    83         void StoreL(CStreamStore& aStore, CStreamDictionary& aStreamDic) const;
       
    84 
       
    85         // from CEikDocument
       
    86         void OpenFileL( CFileStore*& aFileStore, RFile& aFile );
       
    87 
       
    88         // from CEikDocument
       
    89         CFileStore* OpenFileL(TBool aDoOpen,const TDesC& aFilename,RFs& aFs);
       
    90 
       
    91     private:
       
    92 
       
    93         /**
       
    94         * EPOC default constructor.
       
    95         */
       
    96         CPnpProvisioningDocument(CEikApplication& aApp);
       
    97         void ConstructL();
       
    98 
       
    99     private:
       
   100 
       
   101         /**
       
   102         * From CEikDocument, create CPnpProvisioningAppUi "App UI" object.
       
   103         */
       
   104         CEikAppUi* CreateAppUiL();
       
   105         CPnpProvisioningAppUi* iAppUi;
       
   106         HBufC8* iProvisioningData; 
       
   107         CNHeadWrapperParser* iNHwrParser;
       
   108         THttpProvStates::TProvisioningStatus iProvisioningStatus; 
       
   109         TBool iReady;
       
   110         //CPeriodic* iPeriodic;    
       
   111     };
       
   112 
       
   113 #endif
       
   114 
       
   115 // End of File
       
   116