example/clientapi/smf/inc/common/smfmusic/smfalbum.h
author cgandhi <chandradeep.gandhi@sasken.com>
Tue, 06 Apr 2010 16:35:37 +0530
changeset 2 86af6c333601
permissions -rw-r--r--
Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts. Fixed following bugs 2381 and 2382. Added documentation Doxyfile. Modified example_usage.h to show similar usage.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     1
/**
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     2
 * Copyright (c) 2010 Sasken Communication Technologies Ltd.
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     3
 * All rights reserved.
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     4
 * This component and the accompanying materials are made available
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     5
 * under the terms of the "Eclipse Public License v1.0" 
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     6
 * which accompanies  this distribution, and is available
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html"
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     8
 *
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     9
 * Initial Contributors:
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    10
 * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    11
 *
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    12
 * Contributors:
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    13
 * Manasij Roy, Nalina Hariharan
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    14
 * 
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    15
 * Description:
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    16
 * The SmfAlbum class represents a music album
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    17
 *
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    18
 */
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    19
#ifndef SMFALBUM_H_
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    20
#define SMFALBUM_H_
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    21
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    22
#include <QImage>
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    23
#include <qdatastream.h>
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    24
#include <QSharedData>
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    25
#include <smfclientglobal.h>
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    26
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    27
class SmfAlbumPrivate;
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    28
class SmfArtists;
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    29
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    30
/**
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    31
 * @ingroup smf_common_group
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    32
 * The SmfAlbum class represents a music album
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    33
 */
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    34
class SMFCLIENT_EXPORT SmfAlbum : public QObject
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    35
	{
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    36
	Q_OBJECT
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    37
public:
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    38
	/**
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    39
	 * Constructor with default argument
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    40
	 * @param aParent The parent object
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    41
	 */
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    42
	SmfAlbum( QObject *aParent = 0 );
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    43
	
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    44
	/**
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    45
	 * Copy Constructor
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    46
	 * @param aOther The reference object
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    47
	 */
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    48
	SmfAlbum( const SmfAlbum &aOther );
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    49
	
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    50
	/**
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    51
	 * Destructor
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    52
	 */
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    53
	~SmfAlbum( );
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    54
	
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    55
	/**
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    56
	 * Method to get the album name
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    57
	 * @return The album name
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    58
	 */
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    59
	QString name( ) const;
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    60
	
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    61
	/**
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    62
	 * Method to get the album's image
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    63
	 * @return The album's image
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    64
	 */
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    65
	QImage image( ) const;
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    66
	
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    67
	/**
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    68
	 * Method to get the artist names
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    69
	 * @return The list of artists in the album
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    70
	 */
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    71
	SmfArtists artists( ) const;
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    72
	
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    73
	/**
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    74
	 * Method to get the id of the album
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    75
	 * @return The ID value 
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    76
	 */
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    77
	QString id( ) const;
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    78
	
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    79
private:
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    80
	QSharedDataPointer<SmfAlbumPrivate> d;
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    81
	
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    82
	friend QDataStream &operator<<( QDataStream &aDataStream, 
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    83
			const SmfAlbum &aAlbum );
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    84
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    85
	friend QDataStream &operator>>( QDataStream &aDataStream, 
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    86
			SmfAlbum &aAlbum );
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    87
	
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    88
	};
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    89
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    90
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    91
/**
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    92
 * Method for Externalization. Writes the SmfAlbum object to 
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    93
 * the stream and returns a reference to the stream.
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    94
 * @param aDataStream Stream to be written
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    95
 * @param aAlbum The SmfAlbum object to be externalized
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    96
 * @return reference to the written stream
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    97
 */
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    98
QDataStream &operator<<( QDataStream &aDataStream, 
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    99
		const SmfAlbum &aAlbum );
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   100
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   101
/**
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   102
 * Method for Internalization. Reads a SmfAlbum object from 
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   103
 * the stream and returns a reference to the stream.
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   104
 * @param aDataStream Stream to be read
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   105
 * @param aAlbum The SmfAlbum object to be internalized
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   106
 * @return reference to the stream
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   107
 */
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   108
QDataStream &operator>>( QDataStream &aDataStream, 
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   109
		SmfAlbum &aAlbum);
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   110
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   111
86af6c333601 Changed the common classes for location, events. Changed APIs for paged results. Added exporting to QContacts.
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
   112
#endif /* SMFALBUM_H_ */