pkiutilities/CertSaver/inc/CertSaverDocument.h
changeset 0 164170e6151a
equal deleted inserted replaced
-1:000000000000 0:164170e6151a
       
     1 /*
       
     2 * Copyright (c) 2003-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:   Document class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CERTSAVERDOCUMENT_H
       
    20 #define CERTSAVERDOCUMENT_H
       
    21 
       
    22 // INCLUDES
       
    23 #include "certparser.h"
       
    24 #include <eikdoc.h>
       
    25 
       
    26 // CONSTANTS
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class  CEikAppUi;
       
    30 class CShutterAO;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 *  CCertSaverDocument document class.
       
    36 */
       
    37 class CCertSaverDocument : public CEikDocument
       
    38     {
       
    39     public: // Constructors and destructor
       
    40         /**
       
    41         * Two-phased constructor.
       
    42         */
       
    43         static CCertSaverDocument* NewL( CEikApplication& aApp );
       
    44 
       
    45         /**
       
    46         * Destructor.
       
    47         */
       
    48         virtual ~CCertSaverDocument();
       
    49 
       
    50     public: // New functions
       
    51 
       
    52         /**
       
    53         * Returns reference to parser.
       
    54         */
       
    55         CCertParser& Parser() const;
       
    56 
       
    57     public: // Functions from base classes
       
    58 
       
    59         /**
       
    60         * From CEikDocument class.
       
    61         * When file-based epoc application started, Uikon framework
       
    62         * uses OpenFileL function to open the file with file name
       
    63         */
       
    64         CFileStore* OpenFileL( TBool aDoOpen, const TDesC& aFilename, RFs& aFs );
       
    65 
       
    66         /**
       
    67         * From CEikDocument class.
       
    68         * When file-based epoc application started, Uikon framework
       
    69         * uses OpenFileL function to open the file
       
    70         */
       
    71         void OpenFileL( CFileStore*& aFileStore, RFile& aFile );
       
    72 
       
    73     protected:  // New functions
       
    74 
       
    75     protected:  // Functions from base classes
       
    76 
       
    77     private:
       
    78 
       
    79         /**
       
    80         * EPOC default constructor.
       
    81         */
       
    82         CCertSaverDocument( CEikApplication& aApp ): CEikDocument( aApp ) { }
       
    83         void ConstructL();
       
    84 
       
    85     private:
       
    86 
       
    87         /**
       
    88         * From CEikDocument, create CCertSaverAppUi "App UI" object.
       
    89         */
       
    90         CEikAppUi* CreateAppUiL();
       
    91 
       
    92   private:    // Data
       
    93 
       
    94         CCertParser* iParser;
       
    95         CShutterAO* iAO;
       
    96     };
       
    97 
       
    98 
       
    99 // CLASS DECLARATION
       
   100 
       
   101 /**
       
   102 *  CShutterAO document class.
       
   103 *  Active object used to shut down application.
       
   104 */
       
   105 
       
   106 class CShutterAO : public CActive
       
   107     {
       
   108     public:
       
   109         /**
       
   110         * Constructor.
       
   111         */
       
   112         CShutterAO();
       
   113 
       
   114         /**
       
   115         * Constructor.
       
   116         */
       
   117         virtual ~CShutterAO();
       
   118 
       
   119         /**
       
   120         * Exits the application in RunL
       
   121         */
       
   122         void Exit();
       
   123 
       
   124     private:
       
   125         void DoCancel();
       
   126         void RunL();
       
   127     };
       
   128 
       
   129 #endif  // CERTSAVERDOCUMENT_H
       
   130 
       
   131 // End of File