1.1 --- a/epoc32/include/mw/biodb.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ b/epoc32/include/mw/biodb.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -1,9 +1,9 @@
1.4 // Copyright (c) 1999-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,7 +11,15 @@
1.16 // Contributors:
1.17 //
1.18 // Description:
1.19 -//
1.20 +// BIODB.H
1.21 +//
1.22 +/**
1.23 + * @file
1.24 + * BIO information file (BIF) database.
1.25 + *
1.26 + * @publishedAll
1.27 + * @released
1.28 + */
1.29
1.30 #ifndef __BIODB_H__
1.31 #define __BIODB_H__
1.32 @@ -19,14 +27,12 @@
1.33 #include <bif.h> // the bif reader
1.34 #include <f32file.h>
1.35
1.36 +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
1.37 +#include <bifchangeobserver.h>
1.38 +#endif
1.39 +
1.40 class CBifEntry;
1.41
1.42 -/** UID of the BIODB.DLL. */
1.43 -const TUid KUidBioDBDll ={0x10005542};
1.44 -
1.45 -/** Buffer to hold BIF identification text. */
1.46 -typedef TBuf<KMaxBioIdText> TBioMsgIdText;
1.47 -
1.48 /** BIO information file (BIF) database.
1.49
1.50 This class reads the installed BIF files and allows information from them
1.51 @@ -146,76 +152,4 @@
1.52
1.53 };
1.54
1.55 -/** Callback interface implemented by classes to receive notifications of BIF files
1.56 -changes from CBifChangeObserver.
1.57 -
1.58 -@publishedPartner
1.59 -@released
1.60 -*/
1.61 -class MBifChangeObserver
1.62 - {
1.63 -public:
1.64 - /** BIF change events. */
1.65 - enum TBifChangeEvent
1.66 - {
1.67 - /** Unknown change. */
1.68 - EBifChangeUnknown = 0,
1.69 - /** BIF added. */
1.70 - EBifAdded,
1.71 - /** BIF deleted. */
1.72 - EBifDeleted,
1.73 - /** BIF changed. */
1.74 - EBifChanged
1.75 - };
1.76 -
1.77 -public:
1.78 - /** Called when a BIF change occurs.
1.79 -
1.80 - @param aEvent Change event type
1.81 - @param aBioID BIO message type of changed BIF */
1.82 - virtual void HandleBifChangeL(TBifChangeEvent aEvent, TUid aBioID)=0;
1.83 - };
1.84 -
1.85 -/** Active object that watches for changes made to the installed BIF files.
1.86 -
1.87 -@publishedPartner
1.88 -@released
1.89 -*/
1.90 -class CBifChangeObserver : public CActive
1.91 - {
1.92 -public:
1.93 - IMPORT_C static CBifChangeObserver* NewL(MBifChangeObserver& aObserver, RFs& aFs);
1.94 - IMPORT_C void Start();
1.95 - ~CBifChangeObserver();
1.96 -
1.97 - static void CleanupBifArray(TAny* aBifArray);
1.98 -
1.99 -private:
1.100 - // from CActive
1.101 - virtual void RunL();
1.102 - virtual void DoCancel();
1.103 -
1.104 -private:
1.105 - CBifChangeObserver(MBifChangeObserver& aObserver, RFs& aFs);
1.106 - void ConstructL();
1.107 -
1.108 - void NotifyObserverL();
1.109 - void WaitForFileNotification();
1.110 - void DoRunL();
1.111 - void CopyEntriesL(const CDir& aDir, CArrayFixFlat<TEntry>& aEntries);
1.112 - TBool CompareReaders(const CBioInfoFileReader& aReader1, const CBioInfoFileReader& aReader2) const;
1.113 -
1.114 - TInt FindEntry(const CBifEntry& aBifEntry, const RPointerArray<CBifEntry>& aEntries, TInt& aIndex) const;
1.115 -
1.116 -private:
1.117 - MBifChangeObserver& iChangeObserver;
1.118 - RFs& iFs;
1.119 -
1.120 - RPointerArray<CBifEntry> iEntries;
1.121 -
1.122 - CBIODatabase* iBioDB;
1.123 - RTimer iTimer;
1.124 - TInt iRetryCount;
1.125 - };
1.126 -
1.127 #endif // __BIODB_H__