qtinternetradio/irqmediaplayer/inc/irqmetadata.h
changeset 0 09774dfdd46b
equal deleted inserted replaced
-1:000000000000 0:09774dfdd46b
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "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 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 #ifndef IRQMETADATA_H_
       
    18 #define IRQMETADATA_H_
       
    19 
       
    20 #include <QString>
       
    21 
       
    22 /**
       
    23  * Station meta data information wrapper.
       
    24  *
       
    25  * Supports all ICY protocol specified meta data information.
       
    26  * Including station URL, station name, artist - song name and bitrate.
       
    27  */
       
    28 
       
    29 class IRQMetaData
       
    30 {
       
    31 public:
       
    32     inline IRQMetaData();
       
    33     inline IRQMetaData(const IRQMetaData& aMetaData);
       
    34     inline ~IRQMetaData();
       
    35 
       
    36     /**
       
    37      * Copies values from the supplied meta data object.
       
    38      *
       
    39      * Resulting object is identical to the supplied one after the call
       
    40      * has been successfully completed.
       
    41      *
       
    42      * @param   aMetaData   Meta data to copy information from.
       
    43      */
       
    44     inline void setMetaData(const IRQMetaData& aMetaData);
       
    45 
       
    46     /**
       
    47      * Clears all data in class.
       
    48      */
       
    49     inline void clear();
       
    50 
       
    51     /**
       
    52      * Sets the stream Url.
       
    53      *
       
    54      * @param   aUrl     The stream Url.
       
    55      */
       
    56     inline void setStreamUrl(const QString& aUrl);
       
    57 
       
    58     /**
       
    59      * Sets the artist and song name.
       
    60      *
       
    61      * @param   aArtistSongName     The artist and song name to set.
       
    62      */
       
    63     inline void setArtistSongName(const QString& aArtistSongName);
       
    64 
       
    65     /**
       
    66      * Sets the artist name.
       
    67      *
       
    68      * @param   aArtistName     The artist name to set.
       
    69      */
       
    70     inline void setArtistName(const QString& aArtistName);
       
    71 
       
    72     /**
       
    73      * Sets the song name.
       
    74      *
       
    75      * @param   aSongName     The song name to set.
       
    76      */
       
    77     inline void setSongName(const QString& aSongName);
       
    78 
       
    79     /**
       
    80      * Sets the audio bitrate.
       
    81      *
       
    82      * @param   aBitrate     The bitrate to set.
       
    83      */
       
    84     inline void setBitrate(const int& aBitrate);
       
    85 
       
    86     /**
       
    87      * Returns the stream Url.
       
    88      *
       
    89      * @return  The stream Url.
       
    90      */
       
    91     inline const QString& getStreamUrl() const;
       
    92 
       
    93     /**
       
    94      * Returns the artist and song name.
       
    95      *
       
    96      * @return  The artist and song name.
       
    97      */
       
    98     inline const QString& getArtistSongName() const;
       
    99 
       
   100     /**
       
   101      * Returns the artist name.
       
   102      *
       
   103      * @return  The artist name.
       
   104      */
       
   105     inline const QString& getArtistName() const;
       
   106 
       
   107     /**
       
   108      * Returns the song name.
       
   109      *
       
   110      * @return  The song name.
       
   111      */
       
   112     inline const QString& getSongName() const;
       
   113 
       
   114     /**
       
   115      * Returns the bitrate.
       
   116      *
       
   117      * @return  The bitrate.
       
   118      */
       
   119     inline const int& getBitrate() const;
       
   120 
       
   121     /**
       
   122      * Equality comparison operator.
       
   123      *
       
   124      * Compares two meta data objects and returns whether or not they are identical.
       
   125      *
       
   126      * @param   aMetaData   Meta data to be used for comparison.
       
   127      * @return  <code>True</code> if the objects are identical, <code>False</code> otherwise.
       
   128      */
       
   129     inline bool operator==(const IRQMetaData& aMetaData) const;
       
   130 
       
   131     /**
       
   132      * Inequality comparison operator.
       
   133      *
       
   134      * Compares two meta data objects and returns whether or not they are not identical.
       
   135      *
       
   136      * @param   aMetaData   Meta data to be used for comparison.
       
   137      * @return  <code>True</code> if the objects are not identical, <code>False</code> otherwise.
       
   138      */
       
   139     inline bool operator!=(const IRQMetaData& aMetaData) const;
       
   140 
       
   141 private:
       
   142     QString iUrl;
       
   143     QString iArtistSongName;
       
   144     QString iArtistName;
       
   145     QString iSongName;
       
   146     int iBitrate;
       
   147 };
       
   148 
       
   149 #include "irqmetadata.inl"
       
   150 
       
   151 #endif /* IRQMETADATA_H_ */