|
1 /* |
|
2 * Copyright (c) 2010 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef HSIMAGEHANDLINGCLIENT_H |
|
19 #define HSIMAGEHANDLINGCLIENT_H |
|
20 |
|
21 #include <QObject> |
|
22 |
|
23 #ifdef Q_OS_SYMBIAN |
|
24 #include <xqaiwrequest.h> |
|
25 #include <xqappmgr.h> |
|
26 #endif // Q_OS_SYMBIAN |
|
27 |
|
28 #include "hsutils_global.h" |
|
29 |
|
30 class HSUTILS_EXPORT HsImageHandlingClient : public QObject |
|
31 { |
|
32 Q_OBJECT |
|
33 |
|
34 public: |
|
35 HsImageHandlingClient(QObject *parent = 0); |
|
36 ~HsImageHandlingClient(); |
|
37 |
|
38 public slots: |
|
39 void fetch(); |
|
40 void edit(const QString &imagePath); |
|
41 |
|
42 private slots: |
|
43 // Aiw request responses |
|
44 void handleOk(const QVariant &result); |
|
45 void handleError(int errorCode, const QString &errorMessage); |
|
46 void handleEditorOk(const QVariant& result); |
|
47 void handleEditorError(int errorCode, const QString &errorMessage); |
|
48 |
|
49 signals: |
|
50 void fetchCompleted(const QString &imageFile); |
|
51 void fetchFailed(int errorCode, const QString &errorMessage); |
|
52 void editorCompleted(); |
|
53 void editorFailed(int errorCode, const QString &errorMessage); |
|
54 |
|
55 private: |
|
56 Q_DISABLE_COPY(HsImageHandlingClient) |
|
57 |
|
58 #ifdef Q_OS_SYMBIAN |
|
59 XQApplicationManager mAppMgr; |
|
60 XQAiwRequest *mReq; |
|
61 #endif // Q_OS_SYMBIAN |
|
62 }; |
|
63 |
|
64 #endif // HSIMAGEHANDLINGCLIENT_H |