example/clientapi/smf/inc/common/smfmusic/smftrackinfo_p.h
changeset 2 86af6c333601
equal deleted inserted replaced
1:4b1e636e8a71 2:86af6c333601
       
     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 SmfTrackInfo class
       
    17  *
       
    18  */
       
    19 
       
    20 #ifndef SMFTRACKINFO_P_H_
       
    21 #define SMFTRACKINFO_P_H_
       
    22 
       
    23 #include <QTime>
       
    24 #include <smfmusicrating.h>
       
    25 #include <QStringList>
       
    26 #include <QSharedData>
       
    27 
       
    28 class SmfTrackInfoPrivate : public QSharedData
       
    29 {
       
    30 public:
       
    31 	/**
       
    32 	 * Constructor
       
    33 	 */
       
    34 	SmfTrackInfoPrivate( int aMaxRating, int aMinRating ) : m_rating(aMaxRating, aMinRating) 
       
    35 		{ 
       
    36 		m_trackId.clear();
       
    37 		m_title.clear();
       
    38 		m_albumTitle.clear();
       
    39 		m_artistName.clear();
       
    40 		m_genre.clear();
       
    41 		m_tag.clear();
       
    42 		m_comment.clear();
       
    43 	}
       
    44 	
       
    45 	/**
       
    46 	 * Copy Consturctor
       
    47 	 * @param aOther The reference object to be copy constructed
       
    48 	 */
       
    49 	SmfTrackInfoPrivate( const SmfTrackInfoPrivate &aOther ) : 
       
    50 		QSharedData ( aOther ), 
       
    51 		m_trackId ( aOther.m_trackId ),
       
    52 		m_title ( aOther.m_title ),
       
    53 		m_albumTitle ( aOther.m_albumTitle ),
       
    54 		m_artistName ( aOther.m_artistName ),
       
    55 		m_genre ( aOther.m_genre ),
       
    56 		m_tag ( aOther.m_tag ),
       
    57 		m_year ( aOther.m_year ),
       
    58 		m_rating ( aOther.m_rating ),
       
    59 		m_comment ( aOther.m_comment ),
       
    60 		m_duration ( aOther.m_duration ) 	{ }
       
    61 	
       
    62 	/**
       
    63 	 * Destructor
       
    64 	 */
       
    65 	~SmfTrackInfoPrivate( );
       
    66   
       
    67 	QString m_trackId;		// track id
       
    68 	QString m_title;		// title
       
    69 	QString m_albumTitle;	// album name
       
    70 	QString m_artistName;	// artist name
       
    71 	QString m_genre;		// genre information
       
    72 	QStringList m_tag;			// tag information
       
    73 	QDateTime m_year;			// release year
       
    74 	SmfMusicRating m_rating;// rating
       
    75 	QStringList m_comment;		// comments
       
    76 	QTime m_duration;		// duration
       
    77 	
       
    78 };
       
    79 
       
    80 #endif /* SMFTRACKINFO_P_H_ */