|
1 /** |
|
2 * Copyright (c) 2010 Sasken Communication Technologies Ltd. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "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 * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution |
|
11 * |
|
12 * Description: |
|
13 * |
|
14 */ |
|
15 |
|
16 #ifndef SMFACTIVITYFETCHER_P_H_ |
|
17 #define SMFACTIVITYFETCHER_P_H_ |
|
18 |
|
19 #include <QObject> |
|
20 #include <QList> |
|
21 |
|
22 #include "smfactivityfetcher.h" |
|
23 #include "smfglobal.h" |
|
24 #include "smfprovider.h" |
|
25 #include "smfcontact.h" |
|
26 #include "smfevent.h" |
|
27 #include "smfactions.h" |
|
28 #include "smfobserver.h" |
|
29 |
|
30 #ifdef Q_OS_SYMBIAN |
|
31 class CSmfClientSymbian; |
|
32 #else |
|
33 class SmfClientQt; |
|
34 #endif |
|
35 |
|
36 class SmfActivityFetcherPrivate : public smfObserver |
|
37 { |
|
38 Q_OBJECT |
|
39 |
|
40 public: |
|
41 |
|
42 /** |
|
43 * Constructs SmfActivityFetcherPrivate. |
|
44 * |
|
45 */ |
|
46 SmfActivityFetcherPrivate(SmfActivityFetcher* activityFetcher); |
|
47 |
|
48 ~SmfActivityFetcherPrivate(); |
|
49 /** |
|
50 * Emits signal resultsAvailable() when list of activities for the user is available |
|
51 */ |
|
52 void selfActivities(int pageNum,int perPage); |
|
53 |
|
54 /** |
|
55 * Emits signal resultsAvailable() when list of activities for other contact is available |
|
56 */ |
|
57 void friendsActivities(const SmfContact& aFriend,int pageNum,int perPage); |
|
58 |
|
59 /** |
|
60 * returns only those activities (self) which are from @arg filters |
|
61 */ |
|
62 void filtered(QList<SmfActivityObjectType> filters,int pageNum,int perPage); |
|
63 /** |
|
64 * From smfObserver. |
|
65 * To notify availibility of asynchronous requests. |
|
66 * @param result Requested result, before using must check error param. |
|
67 * @param opcode Requested opcode, for which the result has arrived. |
|
68 * |
|
69 */ |
|
70 void resultsAvailable(QByteArray result,SmfRequestTypeID opcode, SmfError error); |
|
71 private: |
|
72 SmfActivityFetcher* m_activityFetcher; |
|
73 SmfActivityEntryList* m_entries; |
|
74 #ifdef Q_OS_SYMBIAN |
|
75 CSmfClientSymbian* m_SmfClientPrivate; |
|
76 friend class CSmfClientSymbian; |
|
77 #else |
|
78 SmfClientQt* m_SmfClientPrivate; |
|
79 friend class SmfClientQt; |
|
80 #endif |
|
81 int m_xtraInfoFlag; |
|
82 int m_pageInfoFlag; |
|
83 SmfProvider* m_baseProvider; |
|
84 //serialized byte array of provider+other info to be sent to the server |
|
85 //The order:- SmfProvider then params in order of their appearance in fn |
|
86 QByteArray m_serializedDataToServer; |
|
87 //serialized xtra info, order of serialization follows order of param |
|
88 QByteArray m_xtraInfoSerialized; |
|
89 }; |
|
90 |
|
91 #endif /* SMFACTIVITYFETCHER_P_H_ */ |