diff -r 000000000000 -r 164170e6151a pkiutilities/CertSaver/inc/CertSaverDocument.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pkiutilities/CertSaver/inc/CertSaverDocument.h Tue Jan 26 15:20:08 2010 +0200 @@ -0,0 +1,131 @@ +/* +* Copyright (c) 2003-2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Document class +* +*/ + + +#ifndef CERTSAVERDOCUMENT_H +#define CERTSAVERDOCUMENT_H + +// INCLUDES +#include "certparser.h" +#include + +// CONSTANTS + +// FORWARD DECLARATIONS +class CEikAppUi; +class CShutterAO; + +// CLASS DECLARATION + +/** +* CCertSaverDocument document class. +*/ +class CCertSaverDocument : public CEikDocument + { + public: // Constructors and destructor + /** + * Two-phased constructor. + */ + static CCertSaverDocument* NewL( CEikApplication& aApp ); + + /** + * Destructor. + */ + virtual ~CCertSaverDocument(); + + public: // New functions + + /** + * Returns reference to parser. + */ + CCertParser& Parser() const; + + public: // Functions from base classes + + /** + * From CEikDocument class. + * When file-based epoc application started, Uikon framework + * uses OpenFileL function to open the file with file name + */ + CFileStore* OpenFileL( TBool aDoOpen, const TDesC& aFilename, RFs& aFs ); + + /** + * From CEikDocument class. + * When file-based epoc application started, Uikon framework + * uses OpenFileL function to open the file + */ + void OpenFileL( CFileStore*& aFileStore, RFile& aFile ); + + protected: // New functions + + protected: // Functions from base classes + + private: + + /** + * EPOC default constructor. + */ + CCertSaverDocument( CEikApplication& aApp ): CEikDocument( aApp ) { } + void ConstructL(); + + private: + + /** + * From CEikDocument, create CCertSaverAppUi "App UI" object. + */ + CEikAppUi* CreateAppUiL(); + + private: // Data + + CCertParser* iParser; + CShutterAO* iAO; + }; + + +// CLASS DECLARATION + +/** +* CShutterAO document class. +* Active object used to shut down application. +*/ + +class CShutterAO : public CActive + { + public: + /** + * Constructor. + */ + CShutterAO(); + + /** + * Constructor. + */ + virtual ~CShutterAO(); + + /** + * Exits the application in RunL + */ + void Exit(); + + private: + void DoCancel(); + void RunL(); + }; + +#endif // CERTSAVERDOCUMENT_H + +// End of File