os/persistentdata/loggingservices/eventlogger/LogServ/inc/LogServBackupInterface.h
Update contrib.
1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __LOGSERVBACKUPINTERFACE_H__
17 #define __LOGSERVBACKUPINTERFACE_H__
22 class MLogServBackupObserver;
28 typedef TInt TLogServBackupPriority;
31 /////////////////////////////////////////////////////////////////////////////////////////
32 // -----> MLogServBackupInterface (header)
33 /////////////////////////////////////////////////////////////////////////////////////////
37 class MLogServBackupInterface
40 enum TLogServBackupState
42 ELogServBackupStateIdle = 0,
43 ELogServBackupStateBackupInProgress
46 enum TLogBackupStandardNotificationPriorities
48 // The first object that will be told a backup is starting (and the last
49 // to be told that a backup has ended).
50 ELogBackupPriorityFirstToBeNotified = 1000,
52 // The last object to be told that a backup is starting (but the first
53 // to be told that it has ended).
54 ELogBackupPriorityLastToBeNotified = -1000,
56 // Individual object priorities. Not terribly nice really...
57 EObjectDatabaseDriver = ELogBackupPriorityFirstToBeNotified,
58 EObjectViewLock = EObjectDatabaseDriver - 1,
59 EObjectView = EObjectViewLock - 1,
60 EObjectClientChangeNotifications = EObjectView - 1,
61 EObjectChangeTracker = EObjectClientChangeNotifications -1,
63 // Must be last, since it must close the database after everything
64 // has stopped using it.
65 EObjectDatabaseMarshall = ELogBackupPriorityLastToBeNotified,
69 public: // Observer interaction
70 virtual void BIObserverAddL(MLogServBackupObserver& aObserver, TLogServBackupPriority aPriority) = 0;
71 virtual void BIObserverRemove(MLogServBackupObserver& aObserver) = 0;
73 public: // Enquiry interface
74 virtual TLogServBackupState BIState() const = 0;
75 virtual TInt BIErrorValueForCurrentState() const = 0;
76 void BIValidateStateForDatabaseOperationL();
79 virtual void BISetDatabaseNameL(const TDesC& aDatabaseName) = 0;