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