author | cgandhi <chandradeep.gandhi@sasken.com> |
Tue, 02 Mar 2010 16:24:32 +0530 | |
changeset 0 | 5d2360e70d9f |
permissions | -rw-r--r-- |
0
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
1 |
/** |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2010 Sasken Communication Technologies Ltd. |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
5 |
* under the terms of the "{License}" |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
7 |
* at the URL "{LicenseUrl}". |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
8 |
* |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
10 |
* Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
11 |
* |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
12 |
* Contributors: |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
13 |
* |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
14 |
* Description: |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
15 |
* Interface spefication for managing associations between various social contacts |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
16 |
* |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
17 |
*/ |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
18 |
|
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
19 |
#ifndef SMFRELATIONMGR_H |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
20 |
#define SMFRELATIONMGR_H |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
21 |
|
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
22 |
class SmfProvider; |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
23 |
class SmfContact; |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
24 |
class SmfRelationId; //persistent Id of a relation |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
25 |
|
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
26 |
class SmfRelationItem : public SmfContact |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
27 |
{ |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
28 |
private: |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
29 |
//SmfProvider* provider; |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
30 |
|
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
31 |
public: |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
32 |
virtual SmfProvider* provider getProvider()=0; |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
33 |
virtual SmfProvider* provider setProvider(SmfProvider* provider)=0; |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
34 |
}; |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
35 |
|
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
36 |
/** |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
37 |
* Interface for a base service provider. Other service provider classes o derive from |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
38 |
* this base class so that each has access to service provider information |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
39 |
* |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
40 |
* All of the functionality described here should be implemented by a service |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
41 |
* specific plug-in object. |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
42 |
*/ |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
43 |
class SmfRelationMgr : public QObject |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
44 |
{ |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
45 |
Q_OBJECT; |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
46 |
|
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
47 |
public: |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
48 |
// Seeing as this is a plug-in implementation, these will realistically |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
49 |
// be generated by SMF factory of some kind |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
50 |
SmfRelationMgr(QObject* parent = 0); |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
51 |
~SmfRelationMgr(); |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
52 |
|
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
53 |
public: |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
54 |
//create a relation with first contact (id optional) |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
55 |
virtual SmfRelationId create(SmfProvider provider, SmfContact conact, uint id) = 0; |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
56 |
// assign contact to a relation |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
57 |
virtual bool associate(SmfRelationId relation, SmfProvider provider, SmfContact conact) = 0; |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
58 |
//returns first contact in the relation when exists |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
59 |
virtual SmfContact searchById(SmfRelationId relation)=0; |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
60 |
//number of contacts in a relation |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
61 |
virtual uint count(SmfRelationId relation) = 0; |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
62 |
|
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
63 |
slots: |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
64 |
virtual QList<SmfRelationItem> get(SmfRelationId relation)=0;//list of contacts and their provider |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
65 |
virtual QList<SmfRelationId> getAll()=0;//list of all relations |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
66 |
|
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
67 |
signals: |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
68 |
//None at the moment |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
69 |
}; |
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
70 |
|
5d2360e70d9f
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff
changeset
|
71 |
#endif // SMFRELATIONMGR_H |