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