smf/inc/common/smfmusic/smfmusicfingerprint.h
changeset 7 be09cf1f39dd
parent 6 c39a6cfd1fb9
child 8 4102c67b6e56
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  * 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
       
    34 	{
       
    35 public:
       
    36 	/**
       
    37 	 * Constructor with default argument
       
    38 	 */
       
    39 	SmfMusicFingerPrint( );
       
    40 	
       
    41 	/**
       
    42 	 * Constructor with default argument
       
    43 	 * @param aParent The parent object
       
    44 	 */
       
    45 	SmfMusicFingerPrint( const SmfMusicFingerPrint &aOther );
       
    46 	
       
    47 	/**
       
    48 	 * Overloaded = operator
       
    49 	 * @param aOther The reference object
       
    50 	 */
       
    51 	SmfMusicFingerPrint& operator=( const SmfMusicFingerPrint &aOther );
       
    52 	
       
    53 	/**
       
    54 	 * Destructor
       
    55 	 */
       
    56 	~SmfMusicFingerPrint( );
       
    57 	
       
    58 	/**
       
    59 	 * Method to get the music finger print data
       
    60 	 * @return The music finger print data
       
    61 	 */
       
    62 	QByteArray musicFingerPrint ( ) const;
       
    63 	
       
    64 	/**
       
    65 	 * Method to set the music finger print data
       
    66 	 * @param aFp The music finger print data
       
    67 	 */
       
    68 	void setMusicFingerPrint ( const QByteArray &aFp);
       
    69 	
       
    70 private:
       
    71 	QSharedDataPointer<SmfMusicFingerPrintPrivate> d;
       
    72 	
       
    73 	friend QDataStream &operator<<( QDataStream &aDataStream, 
       
    74 			const SmfMusicFingerPrint &aMFP );
       
    75 
       
    76 	friend QDataStream &operator>>( QDataStream &aDataStream, 
       
    77 			SmfMusicFingerPrint &aMFP );
       
    78 	
       
    79 	};
       
    80 
       
    81 
       
    82 /**
       
    83  * Method for Externalization. Writes the SmfMusicFingerPrint object to 
       
    84  * the stream and returns a reference to the stream.
       
    85  * @param aDataStream Stream to be written
       
    86  * @param aMFP The SmfMusicFingerPrint object to be externalized
       
    87  * @return reference to the written stream
       
    88  */
       
    89 QDataStream &operator<<( QDataStream &aDataStream, 
       
    90 		const SmfMusicFingerPrint &aMFP );
       
    91 
       
    92 /**
       
    93  * Method for Internalization. Reads a SmfMusicFingerPrint object from 
       
    94  * the stream and returns a reference to the stream.
       
    95  * @param aDataStream Stream to be read
       
    96  * @param aMFP The SmfMusicFingerPrint object to be internalized
       
    97  * @return reference to the stream
       
    98  */
       
    99 QDataStream &operator>>( QDataStream &aDataStream, 
       
   100 		SmfMusicFingerPrint &aMFP);
       
   101 
       
   102 
       
   103 // Make the class SmfMusicFingerPrint known to QMetaType, so that as to register it.
       
   104 Q_DECLARE_METATYPE(SmfMusicFingerPrint)
       
   105 
       
   106 
       
   107 #endif /* SMFMUSICFINGERPRINT_H_ */