|
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 __LOGSERVVIEWCHANGEMANAGER_H__ |
|
17 #define __LOGSERVVIEWCHANGEMANAGER_H__ |
|
18 |
|
19 #include <logcli.h> |
|
20 #include "LogChangeDefinition.h" |
|
21 #include "LogCliServShared.h" |
|
22 #include "LogServBackupObserver.h" |
|
23 #include "LogServDatabaseChangeObserver.h" |
|
24 |
|
25 // Classes referenced |
|
26 class MLogServDatabaseChangeInterface; |
|
27 |
|
28 |
|
29 ///////////////////////////////////////////////////////////////////////////////////////// |
|
30 // -----> CLogServViewBase (header) |
|
31 ///////////////////////////////////////////////////////////////////////////////////////// |
|
32 /** |
|
33 @internalComponent |
|
34 */ |
|
35 class CLogServViewChangeManager : public CBase |
|
36 { |
|
37 public: |
|
38 static CLogServViewChangeManager* NewL(MLogServDatabaseChangeInterface& aChangeInterface); |
|
39 ~CLogServViewChangeManager(); |
|
40 |
|
41 private: |
|
42 CLogServViewChangeManager(MLogServDatabaseChangeInterface& aChangeInterface); |
|
43 void ConstructL(); |
|
44 |
|
45 public: // CHANGE TRANSACTION |
|
46 |
|
47 /** |
|
48 * |
|
49 */ |
|
50 void ChangeTransactionPrepare(); |
|
51 |
|
52 /** |
|
53 * |
|
54 */ |
|
55 void ChangeTransactionSubmitL(TLogId aId, TLogDatabaseChangeType aType, TInt aViewIndex); |
|
56 |
|
57 /** |
|
58 * |
|
59 */ |
|
60 void ChangeTransactionCommitL(); |
|
61 |
|
62 |
|
63 public: // CHANGE DELIVERY |
|
64 |
|
65 /** |
|
66 * Deliver the next available batch of changes. Panics if there |
|
67 * aren't any. |
|
68 */ |
|
69 void DeliverChangesL(const RMessage2& aMessage); |
|
70 |
|
71 public: // CHANGE REQUEST MANAGEMENT |
|
72 |
|
73 /** |
|
74 * The client has requested change notifications |
|
75 */ |
|
76 void RequestChangeNotifications(const RMessage2& aMessage); |
|
77 |
|
78 /** |
|
79 * The client has cancelled a previous change notification request |
|
80 */ |
|
81 void RequestChangeNotificationsCancel(); |
|
82 |
|
83 private: |
|
84 void NotifyClient(); |
|
85 void CompleteClientChangeMessage(TInt aCompletionCode); |
|
86 |
|
87 private: |
|
88 MLogServDatabaseChangeInterface& iChangeInterface; |
|
89 |
|
90 /** |
|
91 * Completed when the view contents change |
|
92 */ |
|
93 RMessagePtr2 iClientSideChangeMessage; |
|
94 |
|
95 /** |
|
96 * A buffer which contain the list of changed items |
|
97 * for the current change transaction |
|
98 */ |
|
99 CLogChangeDefinition* iTransientChangeDefinition; |
|
100 |
|
101 /** |
|
102 * All the change 'packages' which are outstanding for this client |
|
103 */ |
|
104 RPointerArray<CBufBase> iPendingChanges; |
|
105 |
|
106 }; |
|
107 |
|
108 #endif |