1.1 --- a/epoc32/include/mw/apaflrec.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ b/epoc32/include/mw/apaflrec.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -1,9 +1,9 @@
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 +// under the terms of "Eclipse Public License v1.0"
1.9 // which accompanies this distribution, and is available
1.10 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.12 //
1.13 // Initial Contributors:
1.14 // Nokia Corporation - initial contribution.
1.15 @@ -11,103 +11,19 @@
1.16 // Contributors:
1.17 //
1.18 // Description:
1.19 +// apaflrec.h
1.20 //
1.21
1.22 -#if !defined(__APAFLREC_H__)
1.23 +#ifndef __APAFLREC_H__
1.24 #define __APAFLREC_H__
1.25
1.26 -#if !defined(__APADEF_H__)
1.27 #include <apadef.h>
1.28 -#endif
1.29 -#if !defined(__APAID_H__)
1.30 #include <apaid.h>
1.31 -#endif
1.32
1.33 -// classes defined:
1.34 -class MApaAppStarter;
1.35 -class CApaAppLocator;
1.36 -class CApaFileRecognizer;
1.37 -class CApaFileRecognizerType;
1.38 -class CFileRecognizerExtension;
1.39 -//
1.40 -// classes referenced:
1.41 class TApaAppEntry;
1.42 class CApaCommandLine;
1.43 class RFs;
1.44 -//
1.45
1.46 -// KUidFileRecognizer is UID[1] for app recognizer dll's (UID[2] identifies a particular identifier)
1.47 -/**
1.48 -@publishedAll
1.49 -@released
1.50 -*/
1.51 -#ifdef _UNICODE
1.52 -#define KUidFileRecognizer KUidFileRecognizer16
1.53 -#else
1.54 -#define KUidFileRecognizer KUidFileRecognizer8
1.55 -#endif
1.56 -
1.57 -/**
1.58 -@publishedAll
1.59 -@deprecated
1.60 -*/
1.61 -const TInt KFileRecognizerUidValue8=0x1000013E;
1.62 -
1.63 -/**
1.64 -@publishedAll
1.65 -@deprecated
1.66 -*/
1.67 -const TUid KUidFileRecognizer8={KFileRecognizerUidValue8};
1.68 -
1.69 -/**
1.70 -@publishedAll
1.71 -@released
1.72 -*/
1.73 -const TUid KUidFileRecognizer16={0x10003A37};
1.74 -//
1.75 -
1.76 -
1.77 -class CApaAppLocator : public CBase
1.78 -/**
1.79 -@internalComponent
1.80 -*/
1.81 - {
1.82 -public:
1.83 - virtual TInt GetAppEntryByUid(TApaAppEntry& aAppEntry,TUid aAppUid)=0;
1.84 - virtual TInt GetAppCapabilityByUid(TDes8& aCapabilityBuf,TUid aAppUid)=0;
1.85 - };
1.86 -
1.87 -
1.88 -
1.89 -class CApaFileRecognizer : public CBase
1.90 -/**
1.91 -@internalComponent
1.92 -@deprecated
1.93 -*/
1.94 - {
1.95 -public:
1.96 - //
1.97 - IMPORT_C CApaFileRecognizerType* RecognizeFileL(const TDesC& aFullFileName,const TUidType* aUidType=NULL);
1.98 - IMPORT_C CApaAppLocator* AppLocator() const;
1.99 - //
1.100 - IMPORT_C ~CApaFileRecognizer();
1.101 -protected:
1.102 - IMPORT_C CApaFileRecognizer(RFs& aFs);
1.103 - IMPORT_C void AddFileRecognizerType(CApaFileRecognizerType* aFileRecognizerType);
1.104 - IMPORT_C TInt RemoveFileRecognizerType(const CApaFileRecognizerType* aFileRecognizerType);
1.105 - IMPORT_C void SetAppLocator(CApaAppLocator* aAppLocator); // should be called by child-classes eg during construction
1.106 - static inline void SetAppStarter(CApaFileRecognizerType* aRecognizer,MApaAppStarter* aAppStarter);
1.107 - IMPORT_C void DestroyRecognizerList();
1.108 -protected:
1.109 - RFs& iFs;
1.110 - CApaAppLocator* iAppLocator;
1.111 -private:
1.112 - CApaFileRecognizerType *iFileRecognizerList;
1.113 - };
1.114 -
1.115 -
1.116 -
1.117 -class MApaAppStarter
1.118 /** An interface used by the Application Architecture server to start applications.
1.119
1.120 CEikonEnv is derived from this class.
1.121 @@ -115,6 +31,7 @@
1.122 @publishedPartner
1.123 @released
1.124 @see CEikonEnv */
1.125 +class MApaAppStarter
1.126 {
1.127 public:
1.128 virtual TThreadId StartAppL(const CApaCommandLine& aCommandLine)=0;
1.129 @@ -127,82 +44,4 @@
1.130 TInt iMApaAppStarter_Reserved1;
1.131 };
1.132
1.133 -
1.134 -
1.135 -class CApaFileRecognizerType : public CBase
1.136 -/**
1.137 -@publishedPartner
1.138 -@deprecated
1.139 -*/
1.140 - {
1.141 -public:
1.142 - enum TRecognizedType {EProgram,EDoc,EOtherFile,ENotRecognized};
1.143 -public:
1.144 - virtual TThreadId RunL(TApaCommand aCommand,const TDesC* aDocFileName,const TDesC8* aTailEnd) const=0;
1.145 - inline TThreadId RunL(TApaCommand aCommand, const TDesC* aDocFileName) const;
1.146 - inline TThreadId RunL(TApaCommand aCommand) const;
1.147 - inline TUid AppUid()const;
1.148 - inline TUid TypeUid()const;
1.149 - inline TRecognizedType Type()const;
1.150 - IMPORT_C void Capability(TDes8& aCapabilityBuf)const;
1.151 - IMPORT_C void Lock();
1.152 - IMPORT_C void Unlock();
1.153 -protected:
1.154 - IMPORT_C CApaFileRecognizerType();
1.155 - IMPORT_C ~CApaFileRecognizerType();
1.156 - IMPORT_C TThreadId AppRunL(const CApaCommandLine& aCommandLine) const;
1.157 -private:
1.158 - inline void SetAppStarter(MApaAppStarter* aAppStarter); // must be called before AppRunL()
1.159 - virtual TRecognizedType DoRecognizeFileL(RFs& aFs,TUidType aUidType)=0;
1.160 - TRecognizedType RecognizeFileL(RFs& aFs,const TDesC& aFullFileName,TUidType aUidType);
1.161 - TBool Locked()const;
1.162 - IMPORT_C virtual void Reserved_1();
1.163 -public:
1.164 - IMPORT_C static CApaFileRecognizerType* CreateFileRecognizerL(TUid aImplUid);
1.165 -protected:
1.166 - CApaFileRecognizer* iFileRecognizer;
1.167 - MApaAppStarter* iAppStarter;
1.168 - HBufC* iFullFileName;
1.169 - TUid iFileType; // type UID of the recognizer file (ie UID[1])
1.170 - TUid iAppUid; // UID of the associated app (ie UID[2])
1.171 - TRecognizedType iRecognizedType;
1.172 - TApaAppCapabilityBuf* iCapabilityBuf;
1.173 -private:
1.174 - CApaFileRecognizerType* iNext;
1.175 - TInt iLock;
1.176 - CFileRecognizerExtension* iFileRecognizerExtn;
1.177 -private:
1.178 - friend class CApaFileRecognizer;
1.179 - };
1.180 -
1.181 -
1.182 -//
1.183 -// inlines
1.184 -//
1.185 -
1.186 -inline void CApaFileRecognizer::SetAppStarter(CApaFileRecognizerType* aRecognizer,MApaAppStarter* aAppStarter)
1.187 - { aRecognizer->SetAppStarter(aAppStarter); }
1.188 -
1.189 -inline void CApaFileRecognizerType::SetAppStarter(MApaAppStarter* aAppStarter)
1.190 - { iAppStarter = aAppStarter; }
1.191 -
1.192 -inline TUid CApaFileRecognizerType::AppUid() const
1.193 - { return iAppUid; }
1.194 -
1.195 -inline TUid CApaFileRecognizerType::TypeUid() const
1.196 - { return iFileType; }
1.197 -
1.198 -inline CApaFileRecognizerType::TRecognizedType CApaFileRecognizerType::Type()const
1.199 - { return iRecognizedType; }
1.200 -
1.201 -inline TThreadId CApaFileRecognizerType::RunL(TApaCommand aCommand, const TDesC* aDocFileName) const
1.202 - /** Calls RunL(TApaCommand,const TDesC*,const TDesC8*) with NULL as third parameter.
1.203 - @see CApaFileRecognizerType::RunL(TApaCommand,const TDesC*,const TDesC8*) */
1.204 - { return RunL(aCommand, aDocFileName, NULL); }
1.205 -
1.206 -inline TThreadId CApaFileRecognizerType::RunL(TApaCommand aCommand) const
1.207 - /** Calls RunL(TApaCommand,const TDesC*,const TDesC8*) with NULL as second and third parameter.
1.208 - @see CApaFileRecognizerType::RunL(TApaCommand,const TDesC*,const TDesC8*) */
1.209 - { return RunL(aCommand, NULL, NULL); }
1.210 -
1.211 -#endif
1.212 +#endif // __APAFLREC_H__