1 /* |
|
2 * Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Thumbnail server client-side session |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef THUMBNAILSESSION_H |
|
20 #define THUMBNAILSESSION_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 #include "thumbnailmanagerconstants.h" |
|
25 |
|
26 /** |
|
27 * Thumbnail server client-side session |
|
28 * |
|
29 * @since S60 v5.0 |
|
30 */ |
|
31 NONSHARABLE_CLASS( RThumbnailSession ): public RSessionBase |
|
32 { |
|
33 public: |
|
34 |
|
35 /** |
|
36 * C++ default constructor. |
|
37 * |
|
38 * @since S60 v5.0 |
|
39 * @return New RThumbnailSession session. |
|
40 */ |
|
41 RThumbnailSession(); |
|
42 |
|
43 /** |
|
44 * Connect to server process. |
|
45 * |
|
46 * @since S60 v5.0 |
|
47 * @return Error code. |
|
48 */ |
|
49 TInt Connect(); |
|
50 |
|
51 /** |
|
52 * Close session. |
|
53 * |
|
54 * @since S60 v5.0 |
|
55 */ |
|
56 void Close(); |
|
57 |
|
58 /** |
|
59 * Version info. |
|
60 * |
|
61 * @since S60 v5.0 |
|
62 * @return Version of client. |
|
63 */ |
|
64 TVersion Version(); |
|
65 |
|
66 /** |
|
67 * Request a thumbnail for an object file. |
|
68 * |
|
69 * @since S60 v5.0 |
|
70 * @param aFile File from which the thumbnail is to be created. |
|
71 * @param aTargetUri Target URI to which the imported thumbnail is linked. |
|
72 * @param aParams Package for request parameters. |
|
73 * @param aStatus Status of the request. |
|
74 */ |
|
75 void RequestThumbnailL( const RFile64& aFile, const TDesC& aTargetUri, TThumbnailRequestParamsPckg& |
|
76 aParams, TRequestStatus& aStatus ); |
|
77 |
|
78 /** |
|
79 * Request a thumbnail for an object file. |
|
80 * |
|
81 * @since S60 v5.0 |
|
82 * @param aPath Path of image from which the thumbnail is to be created. |
|
83 * @param aTargetUri Target URI to which the imported thumbnail is linked. |
|
84 * @param aParams Package for request parameters. |
|
85 * @param aStatus Status of the request. |
|
86 */ |
|
87 void RequestThumbnailL( const TDesC& aPath, const TDesC& aTargetUri, const TThumbnailId aThumbnailId, TThumbnailRequestParamsPckg& |
|
88 aParams, TRequestStatus& aStatus ); |
|
89 |
|
90 /** |
|
91 * Request a thumbnail for an object file. |
|
92 * |
|
93 * @since S60 v5.0 |
|
94 * @param aThumbnailId Thumbnail ID |
|
95 * @param aTargetUri Target URI to which the imported thumbnail is linked. |
|
96 * @param aParams Package for request parameters. |
|
97 * @param aStatus Status of the request. |
|
98 */ |
|
99 void RequestThumbnailL( const TThumbnailId aThumbnailId, const TDesC& aTargetUri, |
|
100 TThumbnailRequestParamsPckg& aParams, TRequestStatus& aStatus ); |
|
101 |
|
102 /** |
|
103 * Request set thumbnail for an object file. |
|
104 * |
|
105 * @since S60 v5.0 |
|
106 * @param aBuffer buffer from which the thumbnail is to be created. |
|
107 * @param aTargetUri Target URI to which the imported thumbnail is linked. |
|
108 * @param aParams Package for request parameters. |
|
109 * @param aStatus Status of the request. |
|
110 */ |
|
111 void RequestSetThumbnailL( |
|
112 TDesC8* aBuffer, const TDesC& aTargetUri, |
|
113 TThumbnailRequestParamsPckg& aParams, |
|
114 TRequestStatus& aStatus ); |
|
115 |
|
116 /** |
|
117 * Request set thumbnail for an object file. |
|
118 * |
|
119 * @since S60 v5.0 |
|
120 * @param aBitmapHandle Bitmap handle |
|
121 * @param aTargetUri Target URI to which the imported thumbnail is linked. |
|
122 * @param aParams Package for request parameters. |
|
123 * @param aStatus Status of the request. |
|
124 */ |
|
125 void RequestSetThumbnailL( |
|
126 TInt aBitmapHandle, const TDesC& aTargetUri, |
|
127 TThumbnailRequestParamsPckg& aParams, |
|
128 TRequestStatus& aStatus ); |
|
129 |
|
130 /** |
|
131 * Release bitmap instance kept by server process. |
|
132 * |
|
133 * @since S60 v5.0 |
|
134 * @param aBitmapHandle Handle to bitmap. |
|
135 */ |
|
136 void ReleaseBitmap( TInt aBitmapHandle ); |
|
137 |
|
138 /** |
|
139 * Cancel pending thumbnail request. |
|
140 * |
|
141 * @since S60 v5.0 |
|
142 * @param aRequestId Session specific thumbnail request ID. |
|
143 * @return Error code. |
|
144 */ |
|
145 TInt CancelRequest( TThumbnailRequestId aRequestId ); |
|
146 |
|
147 /** |
|
148 * Change priority of pending thumbnail request. |
|
149 * |
|
150 * @since S60 v5.0 |
|
151 * @param aRequestId Session specific thumbnail request ID. |
|
152 * @param aNewPriority New priority to be set for the request. |
|
153 * @return Error code. |
|
154 */ |
|
155 TInt ChangePriority( TThumbnailRequestId aRequestId, TInt aNewPriority ); |
|
156 |
|
157 /** |
|
158 * Delete thumbnails. |
|
159 * |
|
160 * @since S60 v5.0 |
|
161 * @param aPath Path to media object whose thumbnails should be deleted. |
|
162 */ |
|
163 void DeleteThumbnails( const TDesC& aPath, TThumbnailRequestParamsPckg& aParams, |
|
164 TRequestStatus& aStatus ); |
|
165 |
|
166 /** |
|
167 * Delete thumbnails. |
|
168 * |
|
169 * @since S60 v5.0 |
|
170 * @param aItemId Id of item whose thumbnails should be deleted. |
|
171 */ |
|
172 void DeleteThumbnails( const TThumbnailId aItemId, TThumbnailRequestParamsPckg& aParams, |
|
173 TRequestStatus& aStatus ); |
|
174 |
|
175 /** |
|
176 * Get a list of supported MIME types in a HBufC. The list is space |
|
177 * delimited. |
|
178 * |
|
179 * @since S60 v5.0 |
|
180 * @return MIME type list. Ownership transferred to called. |
|
181 */ |
|
182 HBufC* GetMimeTypeListL(); |
|
183 |
|
184 /** |
|
185 * Update thumbnails. |
|
186 * |
|
187 * @since S60 v5.0 |
|
188 * @param aPath (New) path for the Thumbnail |
|
189 * @param aOrientation Thumbnail orientation |
|
190 * @param aModified Last modified |
|
191 */ |
|
192 void UpdateThumbnails( const TDesC& aPath, const TInt aOrientation, const TInt64 aModified, |
|
193 TThumbnailRequestParamsPckg& aParams, TRequestStatus& aStatus); |
|
194 |
|
195 /** |
|
196 * Rename thumbnails. |
|
197 * |
|
198 * @since S60 v5.0 |
|
199 */ |
|
200 void RenameThumbnails( TThumbnailRequestParamsPckg& aParams, TRequestStatus& aStatus ); |
|
201 |
|
202 private: |
|
203 |
|
204 /** |
|
205 * Launch server process. |
|
206 * |
|
207 * @since S60 v5.0 |
|
208 * @return Error code. |
|
209 */ |
|
210 TInt StartServer(); |
|
211 |
|
212 }; |
|
213 |
|
214 #endif // THUMBNAILSESSION_H |
|