1.1 --- a/epoc32/include/apmfndr.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,157 +0,0 @@
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 -// which accompanies this distribution, and is available
1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 -//
1.11 -// Initial Contributors:
1.12 -// Nokia Corporation - initial contribution.
1.13 -//
1.14 -// Contributors:
1.15 -//
1.16 -// Description:
1.17 -//
1.18 -
1.19 -#if !defined (__APMFNDR_H__)
1.20 -#define __APMFNDR_H__
1.21 -
1.22 -#if !defined(__E32BASE_H__)
1.23 -#include <e32base.h>
1.24 -#endif
1.25 -#if !defined(__F32FILE_H__)
1.26 -#include <f32file.h>
1.27 -#endif
1.28 -#if !defined(__APMREC_H__)
1.29 -#include <apmrec.h>
1.30 -#endif
1.31 -
1.32 -#include <babackup.h>
1.33 -
1.34 -/**
1.35 -@internalComponent
1.36 -*/
1.37 -
1.38 -// classes defined
1.39 -class CApaRecognizerDll;
1.40 -
1.41 -
1.42 -class CApaScanningDataRecognizer : public CApaDataRecognizer
1.43 -/**
1.44 -@publishedPartner
1.45 -@released
1.46 -*/
1.47 - {
1.48 -public:
1.49 - class TRecognizer
1.50 - {
1.51 - friend class CApaRecognizerDll;
1.52 - friend class CT_MimeStep;
1.53 - public:
1.54 - TRecognizer(HBufC* aName);
1.55 - inline const TDesC& Name() const;
1.56 - public:
1.57 - TUid iUid;
1.58 - TInt iDrive;
1.59 - TTime iModified;
1.60 - private:
1.61 - inline TRecognizer();
1.62 - TRecognizer(const TRecognizer&);
1.63 - TRecognizer operator=(const TRecognizer&);
1.64 - private:
1.65 - HBufC* iName;
1.66 - };
1.67 - typedef CArrayFixFlat<TRecognizer> CRecognizerArray;
1.68 -
1.69 -private:
1.70 - class CApaBackupOperationObserver : public CBase, public MBackupOperationObserver
1.71 - {
1.72 - public:
1.73 - CApaBackupOperationObserver(CApaScanningDataRecognizer& aRecognizer);
1.74 - ~CApaBackupOperationObserver();
1.75 - void RegisterObserverL();
1.76 -
1.77 - virtual void HandleBackupOperationEventL(const TBackupOperationAttributes& aBackupOperationAttributes);
1.78 - TInt UpdateCounter() const;
1.79 - void SetUpdateCounter( TInt aValue );
1.80 - private:
1.81 - CBaBackupSessionWrapper* iSession;
1.82 - CApaScanningDataRecognizer& iRecognizer;
1.83 - TInt iUpdateCounter;
1.84 - };
1.85 - friend class CApaScanningDataRecognizer::CApaBackupOperationObserver;
1.86 -
1.87 - class CApaScanningDataRecognizerExtra : public CBase
1.88 - {
1.89 - private:
1.90 - CApaBackupOperationObserver* iObserver;
1.91 - TBool iRecognizersLoaded;
1.92 - friend class CApaScanningDataRecognizer;
1.93 - friend class CApaBackupOperationObserver;
1.94 - };
1.95 -
1.96 - //
1.97 -public:
1.98 - IMPORT_C static CApaScanningDataRecognizer* NewL(RFs& aFs);
1.99 - IMPORT_C static CApaScanningDataRecognizer* NewL(RFs& aFs, TBool aLoadDataRecognizers);
1.100 - IMPORT_C ~CApaScanningDataRecognizer();
1.101 - IMPORT_C void ScanForRecognizersL();
1.102 - IMPORT_C TInt RecognizerCount();
1.103 - IMPORT_C CRecognizerArray* RecognizerListLC()const;
1.104 - IMPORT_C const TRecognizer& operator[](TInt aIndex)const;
1.105 - IMPORT_C TInt UpdateCounter()const;
1.106 - IMPORT_C void LoadRecognizersL();
1.107 - IMPORT_C void UnloadRecognizers();
1.108 -
1.109 -protected:
1.110 - IMPORT_C CApaScanningDataRecognizer(RFs& aFs);
1.111 - IMPORT_C void ConstructL();
1.112 -private:
1.113 - void ConstructL(TBool aLoadDataRecognizers);
1.114 - void ScanDriveL(TInt aDriveNum);
1.115 - void LoadRecognizerL(const TDesC& aFullName,TUid aUid, const TTime& aTime);
1.116 - TInt RemoveRecognizer(CApaRecognizerDll* aDll);
1.117 - void LoadEcomRecognizerL(TDriveUnit& aDrive,TUid aUid);
1.118 - void ScanForEcomRecognizersL();
1.119 -public:
1.120 - IMPORT_C void SetEcomRecognizersFromListL(const CRecognizerArray& aList);
1.121 - IMPORT_C void SetEcomRecognizerL(const TRecognizer& aRecognizer);
1.122 -private:
1.123 - friend class CApaBackupObserver;
1.124 - RPointerArray<CApaRecognizerDll> iRecognizerLib;
1.125 - CApaScanningDataRecognizerExtra* iExtra;
1.126 - };
1.127 -
1.128 -
1.129 -class CApaRecognizerDll : public CBase
1.130 -/**
1.131 -@internalTechnology
1.132 -*/
1.133 - {
1.134 -public:
1.135 - CApaRecognizerDll(HBufC* aName);
1.136 - ~CApaRecognizerDll(); // closes lib and deletes next
1.137 -public:
1.138 - enum TPresence { ENotPresent, EIsPresent, ESuperseded };
1.139 -public:
1.140 - RLibrary iLibrary;
1.141 - CApaRecognizerDll* iNext;
1.142 - CApaScanningDataRecognizer::TRecognizer iId; // cached so that this data can be accessed from other threads (RLibrary cant be used in this case)
1.143 - CApaDataRecognizerType* iRec; // not ownership
1.144 - TPresence iPresent;
1.145 - };
1.146 -
1.147 -//
1.148 -// inlines
1.149 -//
1.150 -
1.151 -inline const TDesC& CApaScanningDataRecognizer::TRecognizer::Name() const
1.152 - {
1.153 - return *iName;
1.154 - }
1.155 -
1.156 -inline CApaScanningDataRecognizer::TRecognizer::TRecognizer()
1.157 - {
1.158 - }
1.159 -
1.160 -#endif