1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/mw/eikproc.h Wed Mar 31 12:27:01 2010 +0100
1.3 @@ -0,0 +1,73 @@
1.4 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#ifndef __EIKPROC_H__
1.20 +#define __EIKPROC_H__
1.21 +
1.22 +#include <apparc.h>
1.23 +#include <eikdef.h>
1.24 +
1.25 +class CFileStore;
1.26 +class CEikDocument;
1.27 +
1.28 +/** The controlling process for an application.
1.29 +
1.30 +An instance of this class is created by the Uikon environment. This instance
1.31 +calls CApaProcess::AddNewDocumentL() to load the application DLL and
1.32 +construct the new application which runs in this environment.
1.33 +
1.34 +It also provides services related to an application's main (non-embedded) document,
1.35 +including:
1.36 +- saving the main document to a direct file store
1.37 +- providing the name of the most recently accessed file
1.38 +- getting the name of the application DLL associated with a document.
1.39 +
1.40 +@publishedAll
1.41 +@released */
1.42 +NONSHARABLE_CLASS(CEikProcess) : public CApaProcess
1.43 + {
1.44 +public:
1.45 + /** Used as a parameter by CEikProcess::SetLastUsedFileL() and LastUsedFileL()
1.46 + to indicate whether the function relates to the last opened or last created file.*/
1.47 + enum TLastUsedFile
1.48 + {
1.49 + /** Last opened file.*/
1.50 + ELastOpenFile,
1.51 + /** Last created file. */
1.52 + ELastCreatedFile
1.53 + };
1.54 +public:
1.55 + static CEikProcess* NewL(const RFs& aFs, TProcessId aProcessId=KNullProcessId);
1.56 + IMPORT_C TPtrC CommandTailEnd() const;
1.57 + IMPORT_C TFileName MainDocFolder() const;
1.58 + IMPORT_C void SetLastUsedFileL(TLastUsedFile aType,const TDesC& aFileName) const;
1.59 + IMPORT_C TFileName LastUsedFileL(TLastUsedFile aType) const;
1.60 + IMPORT_C void SetMainStore(CFileStore* aMainStore);
1.61 + IMPORT_C CFileStore* MainStore() const;
1.62 + IMPORT_C void AppFromDocL(TDes& aLibraryName,const TDesC& aDocumentName) const;
1.63 + IMPORT_C void SaveToDirectFileStoreL(CEikDocument* aDoc,const TFileName* aNewFileName=NULL);
1.64 + IMPORT_C void SaveToDirectFileStoreL(CEikDocument* aDoc,const TFileName* aNewFileName,TBool aReopen,TFileName* aTempFile=NULL);
1.65 + IMPORT_C ~CEikProcess();
1.66 +private:
1.67 + CEikProcess(const RFs& aFs);
1.68 + void GetLibraryNameL(TDes& aLibraryName,const CFileStore& aDocStore, const CStreamDictionary& aStreamDic) const;
1.69 + void OpenNewFileL(const TFileName* aNewFileName, const TParse& aNewFilePath);
1.70 + CDictionaryStore* OpenMainAppIniFileLC() const;
1.71 +private:
1.72 + TPtrC iCommandTailEnd;
1.73 + CFileStore* iMainStore;
1.74 + };
1.75 +
1.76 +#endif // __EIKPROC_H__