|
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 * Contributors: |
|
13 * Manasij Roy, Nalina Hariharan |
|
14 * |
|
15 * Description: |
|
16 * Private Implementation of SmfActivityFetcher |
|
17 * |
|
18 */ |
|
19 |
|
20 #ifndef SMFACTIVITYFETCHER_P_H_ |
|
21 #define SMFACTIVITYFETCHER_P_H_ |
|
22 |
|
23 #include <QList> |
|
24 #include <smfglobal.h> |
|
25 #include <smfactions.h> |
|
26 #include <smfobserver.h> |
|
27 |
|
28 class SmfActivityFetcher; |
|
29 class SmfProvider; |
|
30 class SmfContact; |
|
31 #ifdef Q_OS_SYMBIAN |
|
32 class CSmfClientSymbian; |
|
33 #else |
|
34 class SmfClientQt; |
|
35 #endif |
|
36 |
|
37 |
|
38 class SmfActivityFetcherPrivate : public smfObserver |
|
39 { |
|
40 Q_OBJECT |
|
41 |
|
42 public: |
|
43 /** |
|
44 * Constructs SmfActivityFetcherPrivate. |
|
45 */ |
|
46 SmfActivityFetcherPrivate(SmfActivityFetcher* activityFetcher); |
|
47 |
|
48 /** |
|
49 * Destructor |
|
50 */ |
|
51 ~SmfActivityFetcherPrivate(); |
|
52 |
|
53 /** |
|
54 * Emits signal resultsAvailable() when list of activities for the user is available |
|
55 */ |
|
56 void selfActivities(int pageNum, int perPage); |
|
57 |
|
58 /** |
|
59 * Emits signal resultsAvailable() when list of activities for other contact is available |
|
60 */ |
|
61 void friendsActivities(const SmfContact& aFriend, int pageNum, int perPage); |
|
62 |
|
63 /** |
|
64 * returns only those activities (self) which are from @arg filters |
|
65 */ |
|
66 void filtered(QList<SmfActivityObjectType> filters, int pageNum, int perPage); |
|
67 |
|
68 /** |
|
69 * Request for a custom operation. The signal customDataAvailable() is emitted |
|
70 * when the result is available. |
|
71 * @param operationId OperationId |
|
72 * @param customData Custom data to be sent |
|
73 * Note:-Interpretation of operationId and customData is upto the concerned |
|
74 * plugin and client application. service provider should provide some |
|
75 * serializing-deserializing utilities for these custom data |
|
76 */ |
|
77 void customRequest ( const int& operationId, QByteArray* customData ); |
|
78 |
|
79 public: //From smfObserver |
|
80 /** |
|
81 * To notify availibility of asynchronous requests. |
|
82 * @param result Requested result, before using must check error param. |
|
83 * @param opcode Requested opcode, for which the result has arrived. |
|
84 * @param error Error |
|
85 */ |
|
86 void resultsAvailable(QByteArray result,SmfRequestTypeID opcode, SmfError error); |
|
87 |
|
88 private: |
|
89 SmfActivityFetcher* m_activityFetcher; |
|
90 #ifdef Q_OS_SYMBIAN |
|
91 CSmfClientSymbian* m_SmfClientPrivate; |
|
92 friend class CSmfClientSymbian; |
|
93 #else |
|
94 SmfClientQt* m_SmfClientPrivate; |
|
95 friend class SmfClientQt; |
|
96 #endif |
|
97 int m_argFlag; |
|
98 //serialized byte array of provider+other info to be sent to the server |
|
99 //The order:- SmfProvider then params in order of their appearance in fn |
|
100 QByteArray m_serializedDataToServer; |
|
101 |
|
102 }; |
|
103 |
|
104 #endif /* SMFACTIVITYFETCHER_P_H_ */ |