localisation/apparchitecture/inc/apaapp.h
author Maciej Seroka <maciejs@symbian.org>
Tue, 03 Aug 2010 10:20:34 +0100
branchSymbian3
changeset 57 b8d18c84f71c
permissions -rw-r--r--
Re-enabled smoke test for Language-setting
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
57
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     1
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     2
// All rights reserved.
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     3
// This component and the accompanying materials are made available
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     4
// under the terms of "Eclipse Public License v1.0"
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     5
// which accompanies this distribution, and is available
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     7
//
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     8
// Initial Contributors:
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    10
//
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    11
// Contributors:
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    12
//
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    13
// Description:
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    14
// The main startup of the AppArc server
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    15
// 
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    16
// apaapp.h
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    17
//
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    18
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    19
#ifndef __APAAPP_H__
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    20
#define __APAAPP_H__
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    21
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    22
#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    23
#if !defined(__APAID_PARTNER_H__)
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    24
#include "apaidpartner.h"
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    25
#endif
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    26
#endif //SYMBIAN_ENABLE_SPLIT_HEADERS
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    27
#include <e32std.h>
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    28
#include <e32base.h>
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    29
#include <apadef.h>
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    30
#include <apaid.h>
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    31
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    32
class CApaApplication;
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    33
class CApaDocument;
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    34
class CApaProcess;
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    35
class CDictionaryStore;
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    36
class CImplementationInformation;
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    37
class CApaAppServer;
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    38
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    39
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    40
/** Defines the basic behaviour for applications.
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    41
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    42
The class defines the basic twin roles of an application class as a factory 
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    43
that creates concrete document objects, and as a supplier of utility functions 
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    44
not specific to any particular instance of a document. For example, returning 
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    45
an application's caption, or accessing its .ini file.
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    46
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    47
The class is derived from by the UI framework and is further derived from 
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    48
by the UI application.
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    49
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    50
@publishedAll 
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    51
@released 
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    52
@see CEikApplication */
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    53
class CApaApplication : public CBase
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    54
// base class for applications; allows creation of documents & file stores + display of app icon and name.
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    55
	{
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    56
public:
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    57
	/** Completes construction of this application object.
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    58
	
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    59
	The function is called after an instance of a derived class has been successfully 
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    60
	created using the ordinal 1 function of the application DLL.
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    61
	
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    62
	After calling this function, an application can create document objects.
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    63
	
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    64
	An implementation of this function is supplied by the UI framework.
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    65
	
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    66
	@see CEikApplication */
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    67
	virtual void PreDocConstructL() = 0; // call once before creating document
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    68
	
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    69
	/** Creates a document object.
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    70
	
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    71
	The function is called by the application process when a new document is required. 
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    72
	The application process adds the new document to its list of documents.
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    73
	
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    74
	An implementation of this function is supplied by the UI framework.
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    75
	
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    76
	@param aProcess A pointer to the process associated with the application.
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    77
	@return A pointer to the newly created document.
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    78
	@see CApaProcess::AddNewDocumentL() */
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    79
	virtual CApaDocument* CreateDocumentL(CApaProcess* aProcess) = 0;
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    80
	
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    81
	/** Gets the application specific UID.
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    82
	
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    83
	The UID is used to differentiate between UI applications.
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    84
	
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    85
	An implementation of this function must be supplied by the UI application.
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    86
	
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    87
	@return The application specific UID. */
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    88
	virtual TUid AppDllUid() const = 0;
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    89
public: // utility functions
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    90
	IMPORT_C static TInt GenerateFileName(RFs& aFs, TFileName& aRootName);
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    91
	IMPORT_C CDictionaryStore* OpenIniFileL(RFs& aFs) const;
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    92
	
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    93
	/** Opens the .ini file associated with the application, constructs the dictionary 
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    94
	store object, returns a pointer to it and puts the pointer onto the cleanupstack.
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    95
	
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    96
	The .ini file must be created, if it does not already exist.
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    97
	
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    98
	An implementation of this function is supplied by the UI framework.
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    99
	
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   100
	@param aFs Handle to a file server session 
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   101
	@return A pointer to the dictionary store object that represents the application's .ini file. 
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   102
	@see CEikApplication */
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   103
	virtual CDictionaryStore* OpenIniFileLC(RFs& aFs) const = 0;
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   104
public: // enquiry functions
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   105
	IMPORT_C virtual TFileName AppFullName() const; // returns the full path and name of the app
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   106
	/** Returns the capabilities of the application.
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   107
	
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   108
	Application capability information is represented by an instance of a TApaAppCapability 
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   109
	object wrapped in a packaged modifiable buffer descriptor.
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   110
	
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   111
	The function is called from a number of places within the application framework.
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   112
	
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   113
	An implementation of this function is supplied by the UI framework.
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   114
	
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   115
	@param aInfo A packaged modifiable buffer descriptor (a TPckgBuf), encapsulating 
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   116
	a TApaAppCapability object. 
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   117
	@see CEikApplication
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   118
	@see TApaAppCapability
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   119
	@see TPckgBuf */
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   120
	virtual void Capability(TDes8& aInfo) const = 0;
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   121
public:	// accessor function
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   122
	IMPORT_C TFileName DllName() const;
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   123
	IMPORT_C ~CApaApplication();
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   124
	IMPORT_C virtual void NewAppServerL(CApaAppServer*& aAppServer);
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   125
protected:
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   126
	IMPORT_C CApaApplication();
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   127
public: // internal use only
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   128
	void SetAppFileNameRef(const RBuf& aFileName);
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   129
private:
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   130
	IMPORT_C virtual void CApaApplication_Reserved1();
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   131
	IMPORT_C virtual void CApaApplication_Reserved2();
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   132
private:
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   133
	const RBuf* iAppFileNameRef;  // not owned
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   134
	TUid iEComDtorKey;
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   135
//	friend class CApaProcess;
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   136
	friend class TApaApplicationFactory; // so that it can access iDtorKey
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   137
private:
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   138
	TInt iCApaApplication_Reserved1;
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   139
	};
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   140
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   141
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   142
/** Encapsulates the functionality of creating an application, whether it be via a factory function
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   143
or an ECOM plugin. Instances of this class can usually be created implicitly when required as
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   144
function parameters - just specify the function pointer, ECOM plugin UID or CImplementationInformation
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   145
reference.
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   146
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   147
@publishedAll
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   148
@released
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   149
@see CApaProcess
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   150
@see EikStart */
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   151
class TApaApplicationFactory
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   152
	{
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   153
public:
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   154
	typedef CApaApplication* (*TFunction)();
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   155
public:
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   156
	IMPORT_C TApaApplicationFactory();
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   157
	IMPORT_C TApaApplicationFactory(TFunction aFunction);
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   158
	IMPORT_C TApaApplicationFactory(const CImplementationInformation& aEmbeddedApplicationInformation);
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   159
	IMPORT_C TApaApplicationFactory(TUid aEmbeddedApplicationUid);
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   160
	CApaApplication* CreateApplicationL() const;
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   161
	HBufC* AppFileNameL() const;
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   162
	TUid AppFileUid() const;
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   163
private:
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   164
	enum TType
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   165
		{
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   166
		ETypeFunction,							// if iType is this, iData is a TFunction
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   167
		ETypeEmbeddedApplicationInformation,	// if iType is this, iData is an ECOM CImplementationInformation
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   168
		ETypeEmbeddedApplicationUid				// if iType is this, iData is an ECOM implementation TUid
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   169
		};
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   170
private:
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   171
	static CApaApplication* CreateEmbeddedApplicationL(TUid aUid);
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   172
	static HBufC* EmbeddedApplicationDisplayNameLC(TUid aUid);
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   173
	static HBufC* FullAppFileNameL(const TDesC& aAppName);
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   174
	static void CleanupImplementationArray(TAny* aImplementationArray);
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   175
private:
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   176
	TType iType;
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   177
	TUint iData;
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   178
	mutable CApaApplication* iApplication; // used to be iSpare1
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   179
	TInt iSpare2;
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   180
	};
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   181
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   182
	
b8d18c84f71c Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   183
#endif	// __APAAPP_H__