epoc32/include/eikproc.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // 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
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __EIKPROC_H__
    17 #define __EIKPROC_H__
    18 
    19 #include <apparc.h>
    20 #include <eikdef.h>
    21 
    22 class CFileStore;
    23 class CEikDocument;
    24 
    25 /** The controlling process for an application. 
    26 
    27 An instance of this class is created by the Uikon environment. This instance 
    28 calls CApaProcess::AddNewDocumentL() to load the application DLL and 
    29 construct the new application which runs in this environment. 
    30 
    31 It also provides services related to an application's main (non-embedded) document, 
    32 including: 
    33 - saving the main document to a direct file store
    34 - providing the name of the most recently accessed file
    35 - getting the name of the application DLL associated with a document.
    36 
    37 @publishedAll 
    38 @released */
    39 NONSHARABLE_CLASS(CEikProcess) : public CApaProcess
    40 	{
    41 public:
    42 	/** Used as a parameter by CEikProcess::SetLastUsedFileL() and LastUsedFileL() 
    43 	to indicate whether the function relates to the last opened or last created file.*/
    44 	enum TLastUsedFile
    45 		{
    46 		/** Last opened file.*/
    47 		ELastOpenFile,
    48 		/** Last created file. */
    49 		ELastCreatedFile
    50 		};
    51 public:
    52 	static CEikProcess* NewL(const RFs& aFs, TProcessId aProcessId=KNullProcessId);
    53 	IMPORT_C TPtrC CommandTailEnd() const;
    54 	IMPORT_C TFileName MainDocFolder() const;
    55 	IMPORT_C void SetLastUsedFileL(TLastUsedFile aType,const TDesC& aFileName) const;
    56 	IMPORT_C TFileName LastUsedFileL(TLastUsedFile aType) const;
    57 	IMPORT_C void SetMainStore(CFileStore* aMainStore);
    58 	IMPORT_C CFileStore* MainStore() const;
    59 	IMPORT_C void AppFromDocL(TDes& aLibraryName,const TDesC& aDocumentName) const;
    60 	IMPORT_C void SaveToDirectFileStoreL(CEikDocument* aDoc,const TFileName* aNewFileName=NULL);
    61 	IMPORT_C void SaveToDirectFileStoreL(CEikDocument* aDoc,const TFileName* aNewFileName,TBool aReopen,TFileName* aTempFile=NULL);
    62 	IMPORT_C ~CEikProcess();
    63 private:
    64 	CEikProcess(const RFs& aFs);
    65 	void GetLibraryNameL(TDes& aLibraryName,const CFileStore& aDocStore, const CStreamDictionary& aStreamDic) const;
    66 	void OpenNewFileL(const TFileName* aNewFileName, const TParse& aNewFilePath);
    67 	CDictionaryStore* OpenMainAppIniFileLC() const;
    68 private:
    69 	TPtrC iCommandTailEnd;
    70 	CFileStore* iMainStore;
    71 	};
    72 
    73 #endif	// __EIKPROC_H__