os/persistentdata/loggingservices/eventlogger/LogServ/inc/LogServBackupInterface.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/persistentdata/loggingservices/eventlogger/LogServ/inc/LogServBackupInterface.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,84 @@
1.4 +// Copyright (c) 2002-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 "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.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 +#ifndef __LOGSERVBACKUPINTERFACE_H__
1.20 +#define __LOGSERVBACKUPINTERFACE_H__
1.21 +
1.22 +#include <e32std.h>
1.23 +
1.24 +// Classes referenced
1.25 +class MLogServBackupObserver;
1.26 +
1.27 +/**
1.28 +Typedefs
1.29 +@internalComponent
1.30 +*/
1.31 +typedef TInt TLogServBackupPriority;
1.32 +
1.33 +
1.34 +/////////////////////////////////////////////////////////////////////////////////////////
1.35 +// -----> MLogServBackupInterface (header)
1.36 +/////////////////////////////////////////////////////////////////////////////////////////
1.37 +/**
1.38 +@internalComponent
1.39 +*/
1.40 +class MLogServBackupInterface
1.41 + {
1.42 +public:
1.43 + enum TLogServBackupState
1.44 + {
1.45 + ELogServBackupStateIdle = 0,
1.46 + ELogServBackupStateBackupInProgress
1.47 + };
1.48 +
1.49 + enum TLogBackupStandardNotificationPriorities
1.50 + {
1.51 + // The first object that will be told a backup is starting (and the last
1.52 + // to be told that a backup has ended).
1.53 + ELogBackupPriorityFirstToBeNotified = 1000,
1.54 +
1.55 + // The last object to be told that a backup is starting (but the first
1.56 + // to be told that it has ended).
1.57 + ELogBackupPriorityLastToBeNotified = -1000,
1.58 +
1.59 + // Individual object priorities. Not terribly nice really...
1.60 + EObjectDatabaseDriver = ELogBackupPriorityFirstToBeNotified,
1.61 + EObjectViewLock = EObjectDatabaseDriver - 1,
1.62 + EObjectView = EObjectViewLock - 1,
1.63 + EObjectClientChangeNotifications = EObjectView - 1,
1.64 + EObjectChangeTracker = EObjectClientChangeNotifications -1,
1.65 +
1.66 + // Must be last, since it must close the database after everything
1.67 + // has stopped using it.
1.68 + EObjectDatabaseMarshall = ELogBackupPriorityLastToBeNotified,
1.69 +
1.70 + };
1.71 +
1.72 +public: // Observer interaction
1.73 + virtual void BIObserverAddL(MLogServBackupObserver& aObserver, TLogServBackupPriority aPriority) = 0;
1.74 + virtual void BIObserverRemove(MLogServBackupObserver& aObserver) = 0;
1.75 +
1.76 +public: // Enquiry interface
1.77 + virtual TLogServBackupState BIState() const = 0;
1.78 + virtual TInt BIErrorValueForCurrentState() const = 0;
1.79 + void BIValidateStateForDatabaseOperationL();
1.80 +
1.81 +public: // Misc
1.82 + virtual void BISetDatabaseNameL(const TDesC& aDatabaseName) = 0;
1.83 + };
1.84 +
1.85 +
1.86 +#endif
1.87 +