|
1 /* |
|
2 * Copyright (c) 2009 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 AFSTORAGEPROXY_P_H |
|
19 #define AFSTORAGEPROXY_P_H |
|
20 |
|
21 #include "afasyncrequestobserver.h" |
|
22 |
|
23 #include <QVariant> |
|
24 #include <QStringList> |
|
25 |
|
26 class CAfStorageClient; |
|
27 class CAfEntry; |
|
28 class AfStorageProxy; |
|
29 |
|
30 class AfStorageProxyPrivate : public MAfAsyncRequestObserver |
|
31 { |
|
32 public: |
|
33 AfStorageProxyPrivate(AfStorageProxy *q); |
|
34 ~AfStorageProxyPrivate(); |
|
35 |
|
36 public: |
|
37 bool addActivity(int applicationId, const QString &activityId, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot); |
|
38 bool updateActivity(int applicationId, const QString &activityId, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot); |
|
39 bool saveActivity(int applicationId, const QString &activityId, const QVariant &activityData, const QVariantHash &metadata, const QPixmap &screenshot); |
|
40 bool removeActivity(int applicationId, const QString &activityId); |
|
41 bool removeApplicationActivities(int applicationId); |
|
42 bool activities(QList<QVariantHash> &list); |
|
43 bool applicationActivities(QStringList &list, int applicationId); |
|
44 bool activityData(QVariant &data, int applicationId, const QString &activityId); |
|
45 bool activityMetaData(QVariantHash &metadata, int applicationId, const QString &activityId); |
|
46 bool waitActivity(); |
|
47 bool launchActivity(int applicationId, const QString &activityUri); |
|
48 bool getThumbnail(const QSize &size, const QString &imagePath, void *userData); |
|
49 bool notifyDataChange(); |
|
50 |
|
51 public: // from MAfAsyncRequestObserver |
|
52 virtual void waitActivityRequestCompleted(int result, const TDesC8 &data); |
|
53 virtual void getThumbnailRequestCompleted(int result, int bitmapHandle, void *userData); |
|
54 virtual void dataChangeNotificationCompleted(int result); |
|
55 |
|
56 private: |
|
57 CAfEntry *createFilterEntry(int applicationId = 0, const QString &activityId = QString()); |
|
58 CAfEntry *createSaveEntry(int applicationId, const QString &activityId, const QVariant &activityData, const QVariantHash &metadata); |
|
59 CAfEntry *getEntry(int applicationId, const QString &activityId); |
|
60 QVariantHash extractMetadata(CAfEntry *entry); |
|
61 |
|
62 private: |
|
63 CAfStorageClient *mClient; |
|
64 AfStorageProxy *q_ptr; |
|
65 }; |
|
66 |
|
67 #endif //AFSTORAGEPROXY_P_H |