18 #include "tmformatobserver.h" |
18 #include "tmformatobserver.h" |
19 #include "thumbnaillog.h" |
19 #include "thumbnaillog.h" |
20 |
20 |
21 #include <e32base.h> |
21 #include <e32base.h> |
22 #include <f32file.h> |
22 #include <f32file.h> |
23 #include "OstTraceDefinitions.h" |
|
24 #ifdef OST_TRACE_COMPILER_IN_USE |
|
25 #include "tmformatobserverTraces.h" |
|
26 #endif |
|
27 |
23 |
28 |
24 |
29 // ======== MEMBER FUNCTIONS ======== |
25 // ======== MEMBER FUNCTIONS ======== |
30 |
26 |
31 CTMFormatObserver::CTMFormatObserver ( MTMFormatObserver& aObserver ): |
27 CTMFormatObserver::CTMFormatObserver ( MTMFormatObserver& aObserver ): |
32 iObserver( aObserver ) |
28 iObserver( aObserver ) |
33 { |
29 { |
34 TN_DEBUG1( "CTMFormatObserver::CTMFormatObserver()"); |
30 TN_DEBUG1( "CTMFormatObserver::CTMFormatObserver()"); |
35 OstTrace0( TRACE_NORMAL, CTMFORMATOBSERVER_CTMFORMATOBSERVER, "CTMFormatObserver::CTMFormatObserver" ); |
|
36 } |
31 } |
37 |
32 |
38 |
33 |
39 // --------------------------------------------------------------------------- |
34 // --------------------------------------------------------------------------- |
40 // Second Phase Constructor |
35 // Second Phase Constructor |
41 // --------------------------------------------------------------------------- |
36 // --------------------------------------------------------------------------- |
42 // |
37 // |
43 void CTMFormatObserver::ConstructL() |
38 void CTMFormatObserver::ConstructL() |
44 { |
39 { |
45 TN_DEBUG1("CTMFormatObserver::ConstructL"); |
40 TN_DEBUG1("CTMFormatObserver::ConstructL"); |
46 OstTrace0( TRACE_NORMAL, CTMFORMATOBSERVER_CONSTRUCTL, "CTMFormatObserver::ConstructL" ); |
|
47 |
41 |
48 iBackupSession = CBaBackupSessionWrapper::NewL(); |
42 iBackupSession = CBaBackupSessionWrapper::NewL(); |
49 iBackupSession->RegisterBackupOperationObserverL( *this ); |
43 iBackupSession->RegisterBackupOperationObserverL( *this ); |
50 } |
44 } |
51 |
45 |
95 // --------------------------------------------------------------------------- |
89 // --------------------------------------------------------------------------- |
96 // |
90 // |
97 void CTMFormatObserver::PollStatus() |
91 void CTMFormatObserver::PollStatus() |
98 { |
92 { |
99 TN_DEBUG1("CTMFormatObserver::PollStatus()"); |
93 TN_DEBUG1("CTMFormatObserver::PollStatus()"); |
100 OstTrace0( TRACE_NORMAL, CTMFORMATOBSERVER_POLLSTATUS, "CTMFormatObserver::PollStatus" ); |
|
101 |
94 |
102 TBool formatting = iBackupSession->IsBackupOperationRunning(); |
95 TBool formatting = iBackupSession->IsBackupOperationRunning(); |
103 |
96 |
104 if( formatting ) |
97 if( formatting ) |
105 { |
98 { |
114 // |
107 // |
115 void CTMFormatObserver::HandleBackupOperationEventL( |
108 void CTMFormatObserver::HandleBackupOperationEventL( |
116 const TBackupOperationAttributes& aBackupOperationAttributes) |
109 const TBackupOperationAttributes& aBackupOperationAttributes) |
117 { |
110 { |
118 TN_DEBUG1("CTMFormatObserver::HandleBackupOperationEventL"); |
111 TN_DEBUG1("CTMFormatObserver::HandleBackupOperationEventL"); |
119 OstTrace0( TRACE_NORMAL, CTMFORMATOBSERVER_HANDLEBACKUPOPERATIONEVENTL, "CTMFormatObserver::HandleBackupOperationEventL" ); |
|
120 |
112 |
121 if( aBackupOperationAttributes.iOperation == EStart ) |
113 if( aBackupOperationAttributes.iOperation == EStart ) |
122 { |
114 { |
123 iObserver.FormatNotification(ETrue); |
115 iObserver.FormatNotification(ETrue); |
124 } |
116 } |