appfw/apparchitecture/apserv/apsserv.h
branchRCL_3
changeset 20 c2c61fdca848
parent 19 924385140d98
equal deleted inserted replaced
19:924385140d98 20:c2c61fdca848
     1 // Copyright (c) 1997-2010 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    53 	IMPORT_C static CApaAppArcServer* NewL();
    53 	IMPORT_C static CApaAppArcServer* NewL();
    54 	IMPORT_C static CApaAppArcServer* Self();
    54 	IMPORT_C static CApaAppArcServer* Self();
    55 
    55 
    56 	inline RWsSession& WsSession();
    56 	inline RWsSession& WsSession();
    57 	
    57 	
       
    58 	inline const CApaFsMonitor& AppFsMonitor() const {return *iAppFsMonitor;}
       
    59 	
    58 	inline CApaScanningRuleBasedPlugIns* RuleBasedPlugIns();
    60 	inline CApaScanningRuleBasedPlugIns* RuleBasedPlugIns();
    59 		
    61 		
    60 	// Application list stuff
    62 	// Application list stuff
    61 	inline CApaAppList& AppList();
    63 	inline CApaAppList& AppList();
    62 	TPtrC NativeExecutableL(TUid aNonNativeApplicationType);
    64 	void UpdateApps();
    63 
    65 	IMPORT_C TCallBack RescanCallBack();
    64 #ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
    66 	
    65     void UpdateApps();
    67 	void RegisterNonNativeApplicationTypeL(TUid aApplicationType, const TDesC& aNativeExecutable);
    66     IMPORT_C TCallBack RescanCallBack();
    68 	void DeregisterNonNativeApplicationTypeL(TUid aApplicationType);
    67     void UpdateAppsByForceRegistration();   
    69 	TPtrC NativeExecutableL(TUid aNonNativeApplicationType) const;
    68     void RegisterNonNativeApplicationTypeL(TUid aApplicationType, const TDesC& aNativeExecutable);
    70 	
    69     void DeregisterNonNativeApplicationTypeL(TUid aApplicationType);
       
    70     inline const CApaFsMonitor& AppFsMonitor() const {return *iAppFsMonitor;}
       
    71 	IMPORT_C void HandleInstallationStartEvent();
    71 	IMPORT_C void HandleInstallationStartEvent();
    72 	IMPORT_C void HandleInstallationEndEventL();
    72 	IMPORT_C void HandleInstallationEndEventL();
    73 #endif
       
    74 	
    73 	
    75 	// MIME-type recognition
    74 	// MIME-type recognition
    76 	inline CApaDataRecognizer* MimeTypeRecognizer();
    75 	inline CApaDataRecognizer* MimeTypeRecognizer();
    77 	CRecognitionResult* RecognizeDataAsCRecognitionResultL(RFile& aFile, TInt aPreferredBufSize);
    76 	CRecognitionResult* RecognizeDataAsCRecognitionResultL(RFile& aFile, TInt aPreferredBufSize);
    78 	TDataRecognitionResult RecognizeDataL(const TDesC& aName, const TDesC8& aBuffer);
    77 	TDataRecognitionResult RecognizeDataL(const TDesC& aName, const TDesC8& aBuffer);
   100 	void InitialListPopulationComplete();
    99 	void InitialListPopulationComplete();
   101 public: // from MBackupOperationObserver
   100 public: // from MBackupOperationObserver
   102 	void HandleBackupOperationEventL(const TBackupOperationAttributes& aBackupOperationAttributes);
   101 	void HandleBackupOperationEventL(const TBackupOperationAttributes& aBackupOperationAttributes);
   103 public:	//
   102 public:	//
   104 	IMPORT_C ~CApaAppArcServer();
   103 	IMPORT_C ~CApaAppArcServer();
   105 #ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
       
   106 	TBool NonNativeRecovery() const;
   104 	TBool NonNativeRecovery() const;
   107 	void SetNonNativeRecovery(TBool aValue);
   105 	void SetNonNativeRecovery(TBool aValue);
   108 #else
       
   109     void UpdateAppListL(RArray<TApaAppUpdateInfo>* aAppUpdateInfo, TUid aSecureID);
       
   110 #endif
       
   111 	TBool LoadMbmIconsOnDemand() const;
   106 	TBool LoadMbmIconsOnDemand() const;
   112 
   107 	void UpdateAppsByForceRegistration();
   113 private:
   108 private:
   114 	CApaAppArcServer(TInt aPriority);
   109 	CApaAppArcServer(TInt aPriority);
   115 	void ConstructL();
   110 	void ConstructL();
   116 	virtual CSession2* NewSessionL(const TVersion& aVersion,const RMessage2& aMessage) const;
   111 	virtual CSession2* NewSessionL(const TVersion& aVersion,const RMessage2& aMessage) const;
       
   112 	static TInt AppFsNotifyWithForcedRegistrationsResetCallBack(TAny* aPtr);
       
   113 	static TInt AppFsNotifyCallBack(TAny* aPtr);
   117 	static TInt PlugInNotifyCallBack(TAny* aPtr);
   114 	static TInt PlugInNotifyCallBack(TAny* aPtr);
   118 	static TInt TypeStoreNotifyCallback(TAny* aPtr);
   115 	static TInt TypeStoreNotifyCallback(TAny* aPtr);
   119 	void UpdatePlugIns();
   116 	void UpdatePlugIns();
   120 	void UpdateTypeStore();
   117 	void UpdateTypeStore();
   121 	void DoUpdateTypeStoreL();
   118 	void DoUpdateTypeStoreL();
   122 	
       
   123 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
       
   124     void InitNonNativeApplicationTypeArrayL();
       
   125     TPtrC FindAndAddNonNativeRuntimeMappingL(TUid aNonNativeApplicationType);
       
   126 #else
       
   127     static TInt AppFsNotifyWithForcedRegistrationsResetCallBack(TAny* aPtr);
       
   128     static TInt AppFsNotifyCallBack(TAny* aPtr);
       
   129 	void InternalizeNonNativeApplicationTypeArrayL();
   119 	void InternalizeNonNativeApplicationTypeArrayL();
   130     void ExternalizeNonNativeApplicationTypeArrayL(TInt aIndexToIgnore=-1) const;
   120 	void ExternalizeNonNativeApplicationTypeArrayL(TInt aIndexToIgnore=-1) const;
   131     void ConstructPathsToMonitorL();    
       
   132 #endif
       
   133 	static void DeleteLastNonNativeApplicationType(TAny* aThis);
   121 	static void DeleteLastNonNativeApplicationType(TAny* aThis);
   134 	void NotifyScanComplete();
   122 	void NotifyScanComplete();
   135 	void DeleteCustomAppInfoList();
   123 	void DeleteCustomAppInfoList();
   136 	void LoadRecognizersLC();
   124 	void LoadRecognizersLC();
   137 	void LoadRecognizersL();
   125 	void LoadRecognizersL();
   141 	TInt DoUnloadRecognizers();
   129 	TInt DoUnloadRecognizers();
   142 	TBool CachedRecognitionResult(const TParseBase& aParser, TDataRecognitionResult& aResult) const;
   130 	TBool CachedRecognitionResult(const TParseBase& aParser, TDataRecognitionResult& aResult) const;
   143 	CRecognitionResult* CachedRecognitionResult(const RFile& aFile, const TParseBase& aParser) const;
   131 	CRecognitionResult* CachedRecognitionResult(const RFile& aFile, const TParseBase& aParser) const;
   144 	void CacheRecognitionResultL(const TParseBase& aParser, const TDataRecognitionResult& aResult);
   132 	void CacheRecognitionResultL(const TParseBase& aParser, const TDataRecognitionResult& aResult);
   145 	void CacheRecognitionResultL(const RFile& aFile, const TParseBase& aParser, const TDataRecognitionResult& aResult);
   133 	void CacheRecognitionResultL(const RFile& aFile, const TParseBase& aParser, const TDataRecognitionResult& aResult);
       
   134 	void ConstructPathsToMonitorL();
   146 private:
   135 private:
   147 	enum
   136 	enum
   148 		{
   137 		{
   149 		EOwnsFileRecognizer=0x01,
   138 		EOwnsFileRecognizer=0x01,
   150 		EOwnsAppList=0x02
   139 		EOwnsAppList=0x02
   166 	RFs iFs;
   155 	RFs iFs;
   167 	TInt iRecognizerUsageCount;
   156 	TInt iRecognizerUsageCount;
   168 	CApaAppList* iAppList;
   157 	CApaAppList* iAppList;
   169 	CPeriodic* iRecognizerUnloadTimer;
   158 	CPeriodic* iRecognizerUnloadTimer;
   170 	CApaScanningDataRecognizer* iMimeTypeRecognizer;
   159 	CApaScanningDataRecognizer* iMimeTypeRecognizer;
   171 #ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK	
       
   172 	CApaFsMonitor* iAppFsMonitor;
   160 	CApaFsMonitor* iAppFsMonitor;
   173 #endif
       
   174 	CApaFsMonitor* iTypeStoreMonitor;
   161 	CApaFsMonitor* iTypeStoreMonitor;
   175 	CTypeStoreManager* iMimeTypeToAppMappingsManager;
   162 	CTypeStoreManager* iMimeTypeToAppMappingsManager;
   176 	TTime iTypeStoreModified;
   163 	TTime iTypeStoreModified;
   177 	CBaBackupSessionWrapper* iBaBackupSessionWrapper;
   164 	CBaBackupSessionWrapper* iBaBackupSessionWrapper;
   178 	CApaEComMonitor* iRecEcomMonitor;
   165 	CApaEComMonitor* iRecEcomMonitor;
   185 	update. It means that there is a list fo updated apps that needs to be rolled back.
   172 	update. It means that there is a list fo updated apps that needs to be rolled back.
   186 	*/
   173 	*/
   187 	TBool iNonNativeRecovery;
   174 	TBool iNonNativeRecovery;
   188 
   175 
   189 	TBool iLoadRecognizersOnDemand;
   176 	TBool iLoadRecognizersOnDemand;
   190 #ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK	
       
   191 	CApaAppInstallationMonitor* iAppInstallationMonitor; //CApaAppInstallationMonitor monitors installation and uninstallation of applications.
   177 	CApaAppInstallationMonitor* iAppInstallationMonitor; //CApaAppInstallationMonitor monitors installation and uninstallation of applications.
   192     RBuf iNonNativeApplicationTypeRegistry;	
       
   193     TInt iForceRegistrationStatus;
       
   194 #endif
       
   195 	TBool iLoadMbmIconsOnDemand;
   178 	TBool iLoadMbmIconsOnDemand;
   196 
   179 	RBuf iNonNativeApplicationTypeRegistry;
   197 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
   180 	TInt iForceRegistrationStatus;
   198     RArray<TApaAppUpdateInfo> iAppUpdateInfo;
       
   199 #endif
       
   200 	
       
   201 	};
   181 	};
   202 
   182 
   203 
   183 
   204 /**
   184 /**
   205 The TApaAppViewIconSizeData class encapsulates the attributes that specify how to identify an icon for a particular
   185 The TApaAppViewIconSizeData class encapsulates the attributes that specify how to identify an icon for a particular