|
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 Relation Manager |
|
17 * |
|
18 */ |
|
19 |
|
20 #ifndef SMFRELATIONMGR_P_H |
|
21 #define SMFRELATIONMGR_P_H |
|
22 |
|
23 #include <QStringList> |
|
24 #include <smfprovider.h> |
|
25 #include <smfclientglobal.h> |
|
26 #include <smfglobal.h> |
|
27 #include <smfobserver.h> |
|
28 |
|
29 class SmfRelationMgr; |
|
30 class SmfProvider; |
|
31 #ifdef Q_OS_SYMBIAN |
|
32 class CSmfClientSymbian; |
|
33 #else |
|
34 class SmfClientQt; |
|
35 #endif |
|
36 |
|
37 class SmfRelationMgrPrivate |
|
38 { |
|
39 public: |
|
40 SmfRelationMgrPrivate(SmfRelationMgr* relnMngr); |
|
41 ~SmfRelationMgrPrivate(); |
|
42 |
|
43 public: |
|
44 /** create a relation with first contact (id optional) */ |
|
45 SmfRelationId create(SmfProvider *provider=NULL, SmfContact *contact=NULL); |
|
46 |
|
47 /** assign contact to a relation */ |
|
48 SmfError associate( SmfRelationId& relation, |
|
49 const SmfContact* contact, |
|
50 SmfProvider* provider); |
|
51 |
|
52 /** remove contact from a relation */ |
|
53 SmfError remove(SmfRelationId& relation, |
|
54 const SmfContact* contact); |
|
55 |
|
56 /** returns first relation item in the relation when exists, NULL otherwise */ |
|
57 SmfRelationItem* searchById(const SmfRelationId& relation); |
|
58 |
|
59 /** returns relation Id for a given contacts if exists, NULL otherwise */ |
|
60 SmfRelationId searchByContact( SmfContact contact); |
|
61 |
|
62 /** returns number of contacts in a relation*/ |
|
63 uint count(SmfRelationId relation); |
|
64 |
|
65 /** contacts and their provider */ |
|
66 SmfRelationItem* get(SmfRelationId& relation, quint32 index); |
|
67 |
|
68 /** list of contacts and their provider */ |
|
69 QList<SmfRelationItem> getAll(SmfRelationId& relation); |
|
70 |
|
71 /** list of all relations */ |
|
72 QList<SmfRelationId> getAllRelations(); |
|
73 |
|
74 /** delete a particular relation*/ |
|
75 SmfError Delete(SmfRelationId& relation); |
|
76 |
|
77 private: |
|
78 #ifdef Q_OS_SYMBIAN |
|
79 CSmfClientSymbian* m_SmfClientPrivate; |
|
80 friend class CSmfClientSymbian; |
|
81 #else |
|
82 SmfClientQt* m_SmfClientPrivate; |
|
83 friend class SmfClientQt; |
|
84 #endif |
|
85 QByteArray m_dataForDSM; |
|
86 quint8 m_argFlag; |
|
87 QByteArray m_dataFromDSM; |
|
88 }; |
|
89 |
|
90 #endif // SMFRELATIONMGR_P_H |