30 |
30 |
31 #include "thumbnailmanager.h" |
31 #include "thumbnailmanager.h" |
32 #include "thumbnailmanagerconstants.h" // TThumbnailServerRequestId |
32 #include "thumbnailmanagerconstants.h" // TThumbnailServerRequestId |
33 #include "thumbnailstore.h" // TThumbnailPersistentSize |
33 #include "thumbnailstore.h" // TThumbnailPersistentSize |
34 #include "tmshutdownobserver.h" |
34 #include "tmshutdownobserver.h" |
|
35 #include "tmformatobserver.h" |
35 |
36 |
36 // Needed for creating server thread. |
37 // Needed for creating server thread. |
37 const TUint KDefaultHeapSize = 160 * 1024; |
38 const TUint KDefaultHeapSize = 160 * 1024; |
38 |
39 |
39 class CThumbnailTaskProcessor; |
40 class CThumbnailTaskProcessor; |
42 class CThumbnailStore; |
43 class CThumbnailStore; |
43 class MIHLScaler; |
44 class MIHLScaler; |
44 class CThumbnailServerSession; |
45 class CThumbnailServerSession; |
45 class CThumbnailDiskUnmountObserver; |
46 class CThumbnailDiskUnmountObserver; |
46 class CThumbnailMemoryCardObserver; |
47 class CThumbnailMemoryCardObserver; |
47 class CThumbnailFormatObserver; |
|
48 |
48 |
49 /** |
49 /** |
50 * Helper function to destroy all objects which are referred to |
50 * Helper function to destroy all objects which are referred to |
51 * by pointers in a hash table. |
51 * by pointers in a hash table. |
52 * @since S60 v5.0 |
52 * @since S60 v5.0 |
73 * |
73 * |
74 * @since S60 v5.0 |
74 * @since S60 v5.0 |
75 */ |
75 */ |
76 NONSHARABLE_CLASS( CThumbnailServer ): public CPolicyServer, |
76 NONSHARABLE_CLASS( CThumbnailServer ): public CPolicyServer, |
77 public MMdESessionObserver, |
77 public MMdESessionObserver, |
78 public MTMShutdownObserver |
78 public MTMShutdownObserver, |
|
79 public MTMFormatObserver |
79 { |
80 { |
80 public: |
81 public: |
81 |
82 |
82 /** |
83 /** |
83 * Two-phased constructor |
84 * Two-phased constructor |
133 void HandleSessionError( CMdESession& aSession, TInt aError ); |
134 void HandleSessionError( CMdESession& aSession, TInt aError ); |
134 |
135 |
135 // from MTMShutdownObserver |
136 // from MTMShutdownObserver |
136 void ShutdownNotification(); |
137 void ShutdownNotification(); |
137 |
138 |
|
139 //From MTMFormatObserver |
|
140 void FormatNotification(TBool aFormat); |
|
141 |
138 /** |
142 /** |
139 * Adds bitmap to bitmap pool. Server assumes ownership of the bitmap and |
143 * Adds bitmap to bitmap pool. Server assumes ownership of the bitmap and |
140 * implements reference counting to know when it is safe to delete |
144 * implements reference counting to know when it is safe to delete |
141 * the object. Reference count is increased if the bitmap already |
145 * the object. Reference count is increased if the bitmap already |
142 * exists in the pool. |
146 * exists in the pool. |
143 * |
147 * |
144 * @since S60 v5.0 |
148 * @since S60 v5.0 |
145 * @param aSession Server side session which owns the bitmap. |
149 * @param aSession Server side session which owns the bitmap. |
146 * @param aBitmap Bitmap to be added to pool. |
150 * @param aBitmap Bitmap to be added to pool. |
|
151 * @param aRequestId Session specific thumbnail request ID. |
147 */ |
152 */ |
148 void AddBitmapToPoolL( CThumbnailServerSession* aSession, CFbsBitmap* |
153 void AddBitmapToPoolL( CThumbnailServerSession* aSession, CFbsBitmap* |
149 aBitmap ); |
154 aBitmap, TThumbnailServerRequestId aRequestId ); |
150 |
155 |
151 /** |
156 /** |
152 * Store thumbnail. |
157 * Store thumbnail. |
153 * |
158 * |
154 * @since S60 v5.0 |
159 * @since S60 v5.0 |
648 */ |
659 */ |
649 RPointerArray<CThumbnailDiskUnmountObserver> iUnmountObservers; |
660 RPointerArray<CThumbnailDiskUnmountObserver> iUnmountObservers; |
650 |
661 |
651 CThumbnailMemoryCardObserver* iMMCObserver; |
662 CThumbnailMemoryCardObserver* iMMCObserver; |
652 |
663 |
653 CThumbnailFormatObserver* iFormatObserver; |
664 CTMFormatObserver* iFormatObserver; |
654 |
665 |
655 /** |
666 /** |
656 * Databases for each drive, identified by drive (EDriveC, etc). |
667 * Databases for each drive, identified by drive (EDriveC, etc). |
657 * New databases and created on-the-fly as new requests are received. |
668 * New databases and created on-the-fly as new requests are received. |
658 * Databases are closed when drives are dismounted. |
669 * Databases are closed when drives are dismounted. |