os/persistentdata/loggingservices/eventlogger/LogServ/inc/LogServBackupInterface.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __LOGSERVBACKUPINTERFACE_H__
    17 #define __LOGSERVBACKUPINTERFACE_H__
    18 
    19 #include <e32std.h>
    20 
    21 // Classes referenced
    22 class MLogServBackupObserver;
    23 
    24 /**
    25 Typedefs
    26 @internalComponent
    27 */
    28 typedef TInt TLogServBackupPriority;
    29 
    30 
    31 /////////////////////////////////////////////////////////////////////////////////////////
    32 // -----> MLogServBackupInterface (header)
    33 /////////////////////////////////////////////////////////////////////////////////////////
    34 /**
    35 @internalComponent
    36 */
    37 class MLogServBackupInterface
    38 	{
    39 public:
    40 	enum TLogServBackupState
    41 		{
    42 		ELogServBackupStateIdle = 0,
    43 		ELogServBackupStateBackupInProgress
    44 		};
    45 
    46 	enum TLogBackupStandardNotificationPriorities
    47 		{
    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,
    51 
    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,
    55 
    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,
    62 
    63 		// Must be last, since it must close the database after everything
    64 		// has stopped using it.
    65 		EObjectDatabaseMarshall = ELogBackupPriorityLastToBeNotified,
    66 
    67 		};
    68 
    69 public: // Observer interaction
    70 	virtual void BIObserverAddL(MLogServBackupObserver& aObserver, TLogServBackupPriority aPriority) = 0;
    71 	virtual void BIObserverRemove(MLogServBackupObserver& aObserver) = 0;
    72 
    73 public: // Enquiry interface
    74 	virtual TLogServBackupState BIState() const = 0;
    75 	virtual TInt BIErrorValueForCurrentState() const = 0;
    76 	void BIValidateStateForDatabaseOperationL();
    77 
    78 public: // Misc
    79 	virtual void BISetDatabaseNameL(const TDesC& aDatabaseName) = 0;
    80 	};
    81 
    82 
    83 #endif
    84