1 /** |
1 /** |
2 * Copyright (c) 2010 Sasken Communication Technologies Ltd. |
2 * Copyright (c) 2010 Sasken Communication Technologies Ltd. |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of the "Eclipse Public License v1.0" |
5 * under the terms of the "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html" |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html" |
8 * |
8 * |
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution |
10 * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * Manasij Roy, Nalina Hariharan |
13 * Manasij Roy, Nalina Hariharan |
14 * |
14 * |
15 * Description: |
15 * Description: |
16 * The group class represents an instance of a group as per SN site terminolgy |
16 * The group class represents an instance of a group as per SN site terminolgy |
17 * |
17 * |
18 */ |
18 */ |
19 |
19 |
30 |
30 |
31 /** |
31 /** |
32 * @ingroup smf_common_group |
32 * @ingroup smf_common_group |
33 * The group class represents an instance of a group as per SN site terminolgy |
33 * The group class represents an instance of a group as per SN site terminolgy |
34 */ |
34 */ |
35 class SMFCLIENT_EXPORT SmfGroup : public QObject |
35 class SMFCLIENT_EXPORT SmfGroup |
36 { |
36 { |
37 Q_OBJECT |
37 |
38 public: |
38 public: |
39 /** |
39 /** |
40 * Constructor with default argument |
40 * Constructor with default argument |
41 * @param list The list of members in the group |
41 * @param list The list of members in the group |
42 */ |
42 */ |
43 SmfGroup( QList<SmfContact>* list = 0 ); |
43 SmfGroup( QList<SmfContact>* list = 0 ); |
44 |
44 |
45 /** |
45 /** |
46 * Copy Constructor |
46 * Copy Constructor |
47 * @param aOther The reference object |
47 * @param aOther The reference object |
48 */ |
48 */ |
49 SmfGroup( const SmfGroup &aOther ); |
49 SmfGroup( const SmfGroup &aOther ); |
50 |
50 |
51 /** |
51 /** |
52 * Destructor |
52 * Destructor |
53 */ |
53 */ |
54 ~SmfGroup( ); |
54 ~SmfGroup( ); |
55 |
55 |
56 public slots: |
56 public: |
57 /** |
57 /** |
58 * Method to get the list of members in the group |
58 * Method to get the list of members in the group |
59 * @return The list of members in the group |
59 * @return The list of members in the group |
60 */ |
60 */ |
61 QList<SmfContact> members( ) const; |
61 QList<SmfContact> members( ) const; |
62 |
62 |
63 /** |
63 /** |
64 * Method to get the name of the group |
64 * Method to get the name of the group |
65 * @return The name of the group |
65 * @return The name of the group |
66 */ |
66 */ |
67 QString name( ) const; |
67 QString name( ) const; |
68 |
68 |
69 /** |
69 /** |
70 * Method to get the id of the group |
70 * Method to get the id of the group |
71 * @return The ID value |
71 * @return The ID value |
72 */ |
72 */ |
73 QString id( ) const; |
73 QString id( ) const; |
74 |
74 |
75 private: |
75 private: |
76 QSharedDataPointer<SmfGroupPrivate> d; |
76 QSharedDataPointer<SmfGroupPrivate> d; |
77 |
77 |
78 friend QDataStream &operator<<( QDataStream &aDataStream, |
78 friend QDataStream &operator<<( QDataStream &aDataStream, |
79 const SmfGroup &aGroup ); |
79 const SmfGroup &aGroup ); |
80 |
80 |
81 friend QDataStream &operator>>( QDataStream &aDataStream, |
81 friend QDataStream &operator>>( QDataStream &aDataStream, |
82 SmfGroup &aGroup ); |
82 SmfGroup &aGroup ); |
83 |
83 |
84 }; |
84 }; |
85 |
85 |
86 |
86 |
87 /** |
87 /** |
88 * Method for Externalization. Writes the SmfGroup object to |
88 * Method for Externalization. Writes the SmfGroup object to |
89 * the stream and returns a reference to the stream. |
89 * the stream and returns a reference to the stream. |
90 * @param aDataStream Stream to be written |
90 * @param aDataStream Stream to be written |
91 * @param aGroup The SmfGroup object to be externalized |
91 * @param aGroup The SmfGroup object to be externalized |
92 * @return reference to the written stream |
92 * @return reference to the written stream |
93 */ |
93 */ |
94 QDataStream &operator<<( QDataStream &aDataStream, |
94 QDataStream &operator<<( QDataStream &aDataStream, |
95 const SmfGroup &aGroup ); |
95 const SmfGroup &aGroup ); |
96 |
96 |
97 /** |
97 /** |
98 * Method for Internalization. Reads a SmfGroup object from |
98 * Method for Internalization. Reads a SmfGroup object from |
99 * the stream and returns a reference to the stream. |
99 * the stream and returns a reference to the stream. |
100 * @param aDataStream Stream to be read |
100 * @param aDataStream Stream to be read |
101 * @param aGroup The SmfGroup object to be internalized |
101 * @param aGroup The SmfGroup object to be internalized |
102 * @return reference to the stream |
102 * @return reference to the stream |
103 */ |
103 */ |
104 QDataStream &operator>>( QDataStream &aDataStream, |
104 QDataStream &operator>>( QDataStream &aDataStream, |
105 SmfGroup &aGroup); |
105 SmfGroup &aGroup); |
106 |
106 |
107 // Make the class SmfGroup known to QMetaType, so that as to register it. |
107 // Make the class SmfGroup known to QMetaType, so that as to register it. |
108 Q_DECLARE_METATYPE(SmfGroup) |
108 Q_DECLARE_METATYPE(SmfGroup) |
109 |
109 |