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 __LOGNOTIFY_H__
17 #define __LOGNOTIFY_H__
20 #include "LogServBackupObserver.h"
21 #include "LogServDatabaseChangeObserver.h"
24 class MLogServBackupInterface;
25 class MLogServDatabaseChangeInterface;
28 Uses the previous classes to provide change notifications
31 class CLogNotify : public CTimer, public MLogServBackupObserver, public MLogServDatabaseChangeObserver
34 static CLogNotify* NewL(MLogServBackupInterface& aBackupInterface, MLogServDatabaseChangeInterface& aChangeInterface, TInt aPriority);
38 CLogNotify(MLogServBackupInterface& aBackupInterface, MLogServDatabaseChangeInterface& aChangeInterface, TInt aPriority);
42 void Notify(TTimeIntervalMicroSeconds32 aDelay, const RMessage2& aMessage);
45 private: // FROM MLogServDatabaseChangeObserver
46 void DCOHandleChangeEventsL(const CLogChangeDefinition& aChanges);
48 private: // FROM MLogServBackupObserver
49 void BOHandleEventL(TLogServBackupEvent aEvent);
51 public: // FROM CActive
54 private: // FROM CActive
59 void CheckForChanges();
60 void CompleteClientRequest(TInt aCompletionCode);
65 * So this object knows when a backup is starting. Have to cancel the delay timer
68 MLogServBackupInterface& iBackupInterface;
71 * The change interface
73 MLogServDatabaseChangeInterface& iChangeInterface;
76 * Counters for change tracking
82 * The client-side outstanding notification request
85 RMessagePtr2 iMessagePtr;
88 * Used as a flag to indicate whether the client-side message should
91 TBool iCompleteClientMessage;
93 #ifdef LOGGING_ENABLED
95 TName iClientThreadName;
96 inline void SetClientThreadName(const TDesC& aName) { iClientThreadName = aName; }