18
|
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 class implemented for implicit sharing of SmfPicture class
|
|
17 |
*
|
|
18 |
*/
|
|
19 |
|
|
20 |
#ifndef SMFPICTURE_P_H_
|
|
21 |
#define SMFPICTURE_P_H_
|
|
22 |
|
|
23 |
|
|
24 |
#include <QDateTime>
|
|
25 |
#include <QStringList>
|
|
26 |
#include <QUrl>
|
|
27 |
#include <QSharedData>
|
|
28 |
#include <smfclientglobal.h>
|
|
29 |
#include <smfpicture.h>
|
|
30 |
|
|
31 |
class SmfPicturePrivate : public QSharedData
|
|
32 |
{
|
|
33 |
public:
|
|
34 |
/**
|
|
35 |
* Constructor
|
|
36 |
*/
|
|
37 |
SmfPicturePrivate( ) {
|
|
38 |
m_photoId.clear();
|
|
39 |
m_owner.clear();
|
|
40 |
m_title.clear();
|
|
41 |
m_description.clear();
|
|
42 |
m_comments.clear();
|
|
43 |
m_tags.clear();
|
|
44 |
m_url.clear();
|
|
45 |
isDownloaded = false;
|
|
46 |
}
|
|
47 |
/**
|
|
48 |
* Constructor
|
|
49 |
*/
|
|
50 |
SmfPicturePrivate( const QImage &aImage ) {
|
|
51 |
m_photoId.clear();
|
|
52 |
m_owner.clear();
|
|
53 |
m_title.clear();
|
|
54 |
m_description.clear();
|
|
55 |
m_comments.clear();
|
|
56 |
m_tags.clear();
|
|
57 |
m_url.clear();
|
|
58 |
m_picture = aImage;
|
|
59 |
//false by default
|
|
60 |
isDownloaded = false;
|
|
61 |
}
|
|
62 |
|
|
63 |
/**
|
|
64 |
* Copy Consturctor
|
|
65 |
* @param aOther The reference object to be copy constructed
|
|
66 |
*/
|
|
67 |
SmfPicturePrivate( const SmfPicturePrivate &aOther ) :
|
|
68 |
QSharedData ( aOther ),
|
|
69 |
m_photoId ( aOther.m_photoId ),
|
|
70 |
m_owner ( aOther.m_owner ),
|
|
71 |
m_title ( aOther.m_title ),
|
|
72 |
m_description ( aOther.m_description ),
|
|
73 |
m_picVisibility ( aOther.m_picVisibility ),
|
|
74 |
m_postedOn ( aOther.m_postedOn ),
|
|
75 |
m_comments ( aOther.m_comments ),
|
|
76 |
m_tags ( aOther.m_tags ),
|
|
77 |
m_url ( aOther.m_url ),
|
|
78 |
m_picture ( aOther.m_picture ),
|
|
79 |
isDownloaded(aOther.isDownloaded)
|
|
80 |
{
|
|
81 |
|
|
82 |
}
|
|
83 |
|
|
84 |
/**
|
|
85 |
* Destructor
|
|
86 |
*/
|
|
87 |
~SmfPicturePrivate( )
|
|
88 |
{
|
|
89 |
}
|
|
90 |
|
|
91 |
QString m_photoId; // unique ID of the picture, service provider specific
|
|
92 |
QString m_owner; // owner of the picture
|
|
93 |
QString m_title; // picture title
|
|
94 |
QString m_description; // description
|
|
95 |
SmfPictureVisibility m_picVisibility;// picture visibility
|
|
96 |
QDateTime m_postedOn; // date posted
|
|
97 |
QList<SmfComment> m_comments; // comments
|
|
98 |
QStringList m_tags; // tags
|
|
99 |
QUrl m_url; // url
|
|
100 |
QImage m_picture; // picture data as bytearray
|
|
101 |
/**
|
|
102 |
* Flag whether the content is actually available in device -
|
|
103 |
* if this is false then only the url/link to the media is available
|
|
104 |
* in the class - clients can use the link to download the content/visit
|
|
105 |
* the site.
|
|
106 |
*/
|
|
107 |
bool isDownloaded;
|
|
108 |
};
|
|
109 |
|
|
110 |
#endif /* SMFPICTURE_P_H_ */
|