smf/inc/common/smfmusic/smfmusicfingerprint.h
changeset 3 0446eb7b28aa
child 5 edb9dc8273d9
equal deleted inserted replaced
2:86af6c333601 3:0446eb7b28aa
       
     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  * The SmfMusicFingerPrint class represents a music finger print used in searches
       
    17  *
       
    18  */
       
    19 
       
    20 #ifndef SMFMUSICFINGERPRINT_H_
       
    21 #define SMFMUSICFINGERPRINT_H_
       
    22 
       
    23 #include <qdatastream.h>
       
    24 #include <QSharedData>
       
    25 #include <smfclientglobal.h>
       
    26 
       
    27 class SmfMusicFingerPrintPrivate;
       
    28 
       
    29 /**
       
    30  * @ingroup smf_common_group
       
    31  * The musicfingerprint class represents a music finger print used in searches
       
    32  */
       
    33 class SMFCLIENT_EXPORT SmfMusicFingerPrint : public QObject
       
    34 	{
       
    35 	Q_OBJECT
       
    36 public:
       
    37 	/**
       
    38 	 * Constructor with default argument
       
    39 	 * @param aParent The parent object
       
    40 	 */
       
    41 	SmfMusicFingerPrint( QObject *aParent = 0 );
       
    42 	
       
    43 	/**
       
    44 	 * Constructor with default argument
       
    45 	 * @param aParent The parent object
       
    46 	 */
       
    47 	SmfMusicFingerPrint( const SmfMusicFingerPrint &aOther );
       
    48 	
       
    49 	/**
       
    50 	 * Destructor
       
    51 	 */
       
    52 	~SmfMusicFingerPrint( );
       
    53 	
       
    54 	/**
       
    55 	 * GEt the music finger print data
       
    56 	 * @return The music finger print data
       
    57 	 */
       
    58 	QByteArray musicFingerPrint ( ) const;
       
    59 	
       
    60 private:
       
    61 	QSharedDataPointer<SmfMusicFingerPrintPrivate> d;
       
    62 	
       
    63 	friend QDataStream &operator<<( QDataStream &aDataStream, 
       
    64 			const SmfMusicFingerPrint &aMFP );
       
    65 
       
    66 	friend QDataStream &operator>>( QDataStream &aDataStream, 
       
    67 			SmfMusicFingerPrint &aMFP );
       
    68 	
       
    69 	};
       
    70 
       
    71 
       
    72 /**
       
    73  * Method for Externalization. Writes the SmfMusicFingerPrint object to 
       
    74  * the stream and returns a reference to the stream.
       
    75  * @param aDataStream Stream to be written
       
    76  * @param aMFP The SmfMusicFingerPrint object to be externalized
       
    77  * @return reference to the written stream
       
    78  */
       
    79 QDataStream &operator<<( QDataStream &aDataStream, 
       
    80 		const SmfMusicFingerPrint &aMFP );
       
    81 
       
    82 /**
       
    83  * Method for Internalization. Reads a SmfMusicFingerPrint object from 
       
    84  * the stream and returns a reference to the stream.
       
    85  * @param aDataStream Stream to be read
       
    86  * @param aMFP The SmfMusicFingerPrint object to be internalized
       
    87  * @return reference to the stream
       
    88  */
       
    89 QDataStream &operator>>( QDataStream &aDataStream, 
       
    90 		SmfMusicFingerPrint &aMFP);
       
    91 
       
    92 #endif /* SMFMUSICFINGERPRINT_H_ */