70 */ |
70 */ |
71 int removeApplicationActivities(const QVariantHash &activity); |
71 int removeApplicationActivities(const QVariantHash &activity); |
72 |
72 |
73 /** |
73 /** |
74 * Interface implementation. |
74 * Interface implementation. |
75 * @see int HsActivityDbClientInterface::requestedActivityName(QString &, const QVariantHash &); |
|
76 */ |
|
77 int requestedActivityName(QString &, const QVariantHash &); |
|
78 |
|
79 /** |
|
80 * Interface implementation. |
|
81 * @see int HsActivityDbClientInterface::activities(QList<QVariantHash> &); |
75 * @see int HsActivityDbClientInterface::activities(QList<QVariantHash> &); |
82 */ |
76 */ |
83 int activities(QList<QVariantHash> &); |
77 int activities(QList<QVariantHash> &); |
84 |
78 |
85 /** |
79 /** |
91 /** |
85 /** |
92 * Interface implementation. |
86 * Interface implementation. |
93 * @see int HsActivityDbClientInterface::waitActivity(const QVariantHash &) |
87 * @see int HsActivityDbClientInterface::waitActivity(const QVariantHash &) |
94 */ |
88 */ |
95 int waitActivity(const QVariantHash &activity); |
89 int waitActivity(const QVariantHash &activity); |
|
90 |
|
91 int getThumbnail(QSize size, QString imagePath, QString mimeType, void *userDdata); |
96 |
92 |
97 /** |
93 /** |
98 * Interface implementation. |
94 * Interface implementation. |
99 * @see int HsActivityDbClientInterface::launchActivity(const QVariantHash &) |
95 * @see int HsActivityDbClientInterface::launchActivity(const QVariantHash &) |
100 */ |
96 */ |
104 * Interface implementation. |
100 * Interface implementation. |
105 * @see int HsActivityDbClientInterface::cancelWaitActivity() |
101 * @see int HsActivityDbClientInterface::cancelWaitActivity() |
106 */ |
102 */ |
107 int cancelWaitActivity(); |
103 int cancelWaitActivity(); |
108 |
104 |
109 /** |
|
110 * Read thumbnail from file |
|
111 * @param dst - destination QPixmap instance |
|
112 * @param src - thumbnail file path |
|
113 * @return 0 on success, error code otherwise |
|
114 */ |
|
115 int getThumbnail(QPixmap &dst, const QString & src); |
|
116 |
|
117 public: |
105 public: |
118 /** |
106 /** |
119 * Function get cached data from server |
107 * Function get cached data from server |
|
108 * @param taskId - request task id |
120 * @param dst - destination, preallocated buffer |
109 * @param dst - destination, preallocated buffer |
121 */ |
110 */ |
122 void getData(RBuf8 &dst); |
111 void getData(int taskId, RBuf8 &dst); |
123 |
112 |
124 /** |
113 /** |
125 * Function initialize aync request |
114 * Function initialize aync request |
126 * @param func - requested function |
115 * @param func - requested function |
127 * @param data - request data |
116 * @param data - request data |
128 * @param status - request status |
117 * @param status - request status |
129 */ |
118 */ |
130 void sendDataAsync(int func,const TIpcArgs &data, TRequestStatus &status); |
119 void sendDataAsync(int func,const TIpcArgs &data, TRequestStatus &status); |
|
120 |
|
121 // void emitActivityRequested(); |
|
122 // void emitThumbnailRequested(); |
|
123 |
|
124 public: |
|
125 void PushL(HsActivityDbAsyncRequestPrivate * task); |
|
126 void Pop(HsActivityDbAsyncRequestPrivate *task); |
131 |
127 |
132 private: |
128 private: |
133 /** |
129 /** |
134 * Function start activity server process. |
130 * Function start activity server process. |
135 * Function can leave on failure. |
131 * Function can leave on failure. |
173 */ |
169 */ |
174 void applicationActivitiesL(QList<QVariantHash>& result, |
170 void applicationActivitiesL(QList<QVariantHash>& result, |
175 const QVariantHash &cond); |
171 const QVariantHash &cond); |
176 |
172 |
177 void waitActivityL(const QVariantHash &activity); |
173 void waitActivityL(const QVariantHash &activity); |
|
174 |
|
175 void getThumbnailL(QSize size, QString imagePath, QString mimeType, void *userDdata); |
178 private: |
176 private: |
179 /** |
177 /** |
180 * Async request handler |
178 * Async request handler |
181 * Own |
179 * Own |
182 */ |
180 */ |
183 HsActivityDbAsyncRequestPrivate *mAsyncDataHandler; |
181 HsActivityDbAsyncRequestPrivate *mAsyncDataHandler; |
184 |
182 RPointerArray<HsActivityDbAsyncRequestPrivate> mAsyncTasks; |
|
183 HsActivityDbAsyncRequestObserver& mObserver; |
185 }; |
184 }; |
186 #endif // HSACTIVITYDBCLIENTPRIVATE_H |
185 #endif // HSACTIVITYDBCLIENTPRIVATE_H |