smf/smfservermodule/smfclient/common/smfpicture_p.h
changeset 7 be09cf1f39dd
equal deleted inserted replaced
6:c39a6cfd1fb9 7:be09cf1f39dd
       
     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 	}
       
    46 	/**
       
    47 	 * Constructor
       
    48 	 */
       
    49 	SmfPicturePrivate( const QImage &aImage ) { 
       
    50 		m_photoId.clear();
       
    51 		m_owner.clear();
       
    52 		m_title.clear();
       
    53 		m_description.clear();
       
    54 		m_comments.clear();
       
    55 		m_tags.clear();
       
    56 		m_url.clear();
       
    57 		m_picture = aImage;
       
    58 	}
       
    59 	
       
    60 	/**
       
    61 	 * Copy Consturctor
       
    62 	 * @param aOther The reference object to be copy constructed
       
    63 	 */
       
    64 	SmfPicturePrivate( const SmfPicturePrivate &aOther ) : 
       
    65 		QSharedData ( aOther ), 
       
    66 		m_photoId ( aOther.m_photoId ),
       
    67 		m_owner ( aOther.m_owner ),
       
    68 		m_title ( aOther.m_title ),
       
    69 		m_description ( aOther.m_description ),
       
    70 		m_picVisibility ( aOther.m_picVisibility ),
       
    71 		m_postedOn ( aOther.m_postedOn ),
       
    72 		m_comments ( aOther.m_comments ),
       
    73 		m_tags ( aOther.m_tags ),
       
    74 		m_url ( aOther.m_url ),
       
    75 		m_picture ( aOther.m_picture )	{ }
       
    76 	
       
    77 	/**
       
    78 	 * Destructor
       
    79 	 */
       
    80 	~SmfPicturePrivate( )
       
    81 		{
       
    82 		}
       
    83   
       
    84 	QString m_photoId;		// unique ID of the picture, service provider specific
       
    85 	QString m_owner;		// owner of the picture
       
    86 	QString m_title;		// picture title
       
    87 	QString m_description;	// description
       
    88 	SmfPictureVisibility m_picVisibility;// picture visibility
       
    89 	QDateTime m_postedOn;	// date posted
       
    90 	QList<SmfComment> m_comments;		 // comments
       
    91 	QStringList m_tags;		// tags
       
    92 	QUrl m_url;				// url
       
    93 	QImage m_picture;		// picture data as bytearray
       
    94 	
       
    95 };
       
    96 
       
    97 #endif /* SMFPICTURE_P_H_ */