qtinternetradio/irqsonghistory/src/irqsonghistoryinfo.cpp
changeset 0 09774dfdd46b
child 5 0930554dc389
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 #include "irqsonghistoryinfo.h"
       
    18 
       
    19 // ---------------------------------------------------------------------------
       
    20 //IRQSongHistoryInfo::~IRQSongHistoryInfo()
       
    21 //standard C++ constructor
       
    22 // ---------------------------------------------------------------------------
       
    23 //
       
    24 EXPORT_C IRQSongHistoryInfo::IRQSongHistoryInfo()
       
    25 {
       
    26     iChannelType = 0;
       
    27     iChannelId = 0;
       
    28     iBitrate = 0;
       
    29 }
       
    30 
       
    31 // ---------------------------------------------------------------------------
       
    32 //IRQSongHistoryInfo::~IRQSongHistoryInfo()
       
    33 //standard C++ destructor
       
    34 // ---------------------------------------------------------------------------
       
    35 //
       
    36 EXPORT_C IRQSongHistoryInfo::~IRQSongHistoryInfo()
       
    37 {
       
    38 
       
    39 }
       
    40 
       
    41 // ---------------------------------------------------------------------------
       
    42 // IRQSongHistoryInfo::getArtistName
       
    43 // gets Artist name
       
    44 // ---------------------------------------------------------------------------
       
    45 //
       
    46 EXPORT_C const QString& IRQSongHistoryInfo::getArtistName() const
       
    47 {
       
    48     return iArtistName;
       
    49 }
       
    50 
       
    51 // ---------------------------------------------------------------------------
       
    52 // IRQSongHistoryInfo::getSongName
       
    53 // gets the song information
       
    54 // ---------------------------------------------------------------------------
       
    55 //
       
    56 EXPORT_C const QString& IRQSongHistoryInfo::getSongName() const
       
    57 {
       
    58     return iSongName;
       
    59 }
       
    60 
       
    61 // ---------------------------------------------------------------------------
       
    62 // IRQSongHistoryInfo::getStreamUrl
       
    63 // gets StreamUrl
       
    64 // ---------------------------------------------------------------------------
       
    65 //
       
    66 EXPORT_C const QString& IRQSongHistoryInfo::getStreamUrl() const
       
    67 {
       
    68     return iStreamUrl;
       
    69 }
       
    70 
       
    71 // ---------------------------------------------------------------------------
       
    72 // IRQSongHistoryInfo::getChannelName
       
    73 // gets Channel name
       
    74 // ---------------------------------------------------------------------------
       
    75 //
       
    76 EXPORT_C const QString& IRQSongHistoryInfo::getChannelName() const
       
    77 {
       
    78     return iChannelName;
       
    79 }
       
    80 
       
    81 // ---------------------------------------------------------------------------
       
    82 // IRQSongHistoryInfo::getChannelDesc
       
    83 // gets Channel Description
       
    84 // ---------------------------------------------------------------------------
       
    85 //
       
    86 EXPORT_C const QString& IRQSongHistoryInfo::getChannelDesc() const
       
    87 {
       
    88     return iChannelDescription;
       
    89 }
       
    90 
       
    91 // ---------------------------------------------------------------------------
       
    92 // IRQSongHistoryInfo::getImageUrl
       
    93 // gets Channel image Url
       
    94 // ---------------------------------------------------------------------------
       
    95 //
       
    96 EXPORT_C const QString& IRQSongHistoryInfo::getImageUrl() const
       
    97 {
       
    98     return iImageUrl;
       
    99 }
       
   100 
       
   101 // ---------------------------------------------------------------------------
       
   102 // IRQSongHistoryInfo::getMusicStoreStatus
       
   103 // gets Channel MusicStoreStatus
       
   104 // ---------------------------------------------------------------------------
       
   105 //
       
   106 EXPORT_C const QString& IRQSongHistoryInfo::getMusicStoreStatus() const
       
   107 {
       
   108     return iMusicStoreStatus;
       
   109 }
       
   110 
       
   111 // ---------------------------------------------------------------------------
       
   112 // IRQSongHistoryInfo::getChannelType
       
   113 // gets Channel Type
       
   114 // ---------------------------------------------------------------------------
       
   115 //
       
   116 EXPORT_C int IRQSongHistoryInfo::getChannelType() const
       
   117 {
       
   118     return iChannelType;
       
   119 }
       
   120 // ---------------------------------------------------------------------------
       
   121 // IRQSongHistoryInfo::getChannelId
       
   122 // gets Channel Id
       
   123 // ---------------------------------------------------------------------------
       
   124 //
       
   125 EXPORT_C int IRQSongHistoryInfo::getChannelId() const
       
   126 {
       
   127     return iChannelId;
       
   128 }
       
   129 
       
   130 // ---------------------------------------------------------------------------
       
   131 // IRQSongHistoryInfo::getBitrate
       
   132 // gets Channel bitrate
       
   133 // ---------------------------------------------------------------------------
       
   134 //
       
   135 EXPORT_C int IRQSongHistoryInfo::getBitrate() const
       
   136 {
       
   137     return iBitrate;
       
   138 }
       
   139 
       
   140 // ---------------------------------------------------------------------------
       
   141 // IRQSongHistoryInfo::setHistoryInfo
       
   142 // sets Song History Information.
       
   143 // ---------------------------------------------------------------------------
       
   144 //
       
   145 void IRQSongHistoryInfo::setHistoryInfo(const QString& aArtistName,
       
   146         const QString& aSongName,
       
   147         const QString& aStreamUrl,
       
   148         const QString& aChannelName,
       
   149         const QString& aChannelDesc,
       
   150         const QString& aImageUrl,
       
   151         const QString& aMusicStoreStatus, 
       
   152         int aChannelType,
       
   153         int aChannelId,
       
   154         int aBitrate)
       
   155 {
       
   156     setArtistName(aArtistName);
       
   157     setSongName(aSongName);
       
   158     setStreamUrl(aStreamUrl);
       
   159     setChannelName(aChannelName);
       
   160     setChannelDesc(aChannelDesc);
       
   161     setImageUrl(aImageUrl);
       
   162     setMusicStoreStatus(aMusicStoreStatus);
       
   163     setChannelType(aChannelType);
       
   164     setChannelId(aChannelId);
       
   165     setBitrate(aBitrate);
       
   166 }
       
   167 
       
   168 // ---------------------------------------------------------------------------
       
   169 // IRQSongHistoryInfo::setArtistName
       
   170 // sets Artist name
       
   171 // ---------------------------------------------------------------------------
       
   172 //
       
   173 void IRQSongHistoryInfo::setArtistName(const QString& aArtistName)
       
   174 {
       
   175     iArtistName = aArtistName;
       
   176 }
       
   177 
       
   178 // ---------------------------------------------------------------------------
       
   179 // IRQSongHistoryInfo::setSongName
       
   180 // sets Song name
       
   181 // ---------------------------------------------------------------------------
       
   182 //
       
   183 void IRQSongHistoryInfo::setSongName (const QString& aSongName)
       
   184 {
       
   185     iSongName = aSongName;
       
   186 }
       
   187 
       
   188 // ---------------------------------------------------------------------------
       
   189 // IRQSongHistoryInfo::setStreamUrl
       
   190 // sets Stream url
       
   191 // ---------------------------------------------------------------------------
       
   192 //
       
   193 void IRQSongHistoryInfo::setStreamUrl(const QString& aStreamUrl)
       
   194 {
       
   195     iStreamUrl = aStreamUrl;
       
   196 }
       
   197 
       
   198 // ---------------------------------------------------------------------------
       
   199 // IRQSongHistoryInfo::setChannelName
       
   200 // sets Channel name
       
   201 // ---------------------------------------------------------------------------
       
   202 //
       
   203 void IRQSongHistoryInfo::setChannelName(const QString& aChannelName)
       
   204 {
       
   205     iChannelName = aChannelName;
       
   206 }
       
   207 // ---------------------------------------------------------------------------
       
   208 // IRQSongHistoryInfo::setChannelDesc
       
   209 // sets Channel description
       
   210 // ---------------------------------------------------------------------------
       
   211 //
       
   212 void IRQSongHistoryInfo::setChannelDesc(const QString& aChannelDesc)
       
   213 {
       
   214     iChannelDescription = aChannelDesc;
       
   215 }
       
   216 
       
   217 // ---------------------------------------------------------------------------
       
   218 // IRQSongHistoryInfo::setImageUrl
       
   219 // sets Channel image Url
       
   220 // ---------------------------------------------------------------------------
       
   221 //
       
   222 void IRQSongHistoryInfo::setImageUrl(const QString& aImageUrl)
       
   223 {
       
   224     iImageUrl = aImageUrl;
       
   225 }
       
   226 
       
   227 // ---------------------------------------------------------------------------
       
   228 // IRQSongHistoryInfo::setMusicStoreStatus
       
   229 // sets Channel's MusicStoreStatus
       
   230 // ---------------------------------------------------------------------------
       
   231 //
       
   232 void IRQSongHistoryInfo::setMusicStoreStatus(const QString& aMusicStoreStatus)
       
   233 {
       
   234     iMusicStoreStatus = aMusicStoreStatus;
       
   235 }
       
   236 // ---------------------------------------------------------------------------
       
   237 // IRQSongHistoryInfo::setChannelType
       
   238 // sets Channel type
       
   239 // ---------------------------------------------------------------------------
       
   240 //
       
   241 void IRQSongHistoryInfo::setChannelType(int aChannelType)
       
   242 {
       
   243     iChannelType = aChannelType;
       
   244 }
       
   245 // ---------------------------------------------------------------------------
       
   246 // IRQSongHistoryInfo::setChannelId
       
   247 // sets Channel Id
       
   248 // ---------------------------------------------------------------------------
       
   249 //
       
   250 void IRQSongHistoryInfo::setChannelId(int aChannelId)
       
   251 {
       
   252     iChannelId = aChannelId;
       
   253 }
       
   254 // ---------------------------------------------------------------------------
       
   255 // IRQSongHistoryInfo::setBitrate
       
   256 // sets Channel bitrate
       
   257 // ---------------------------------------------------------------------------
       
   258 //
       
   259 void IRQSongHistoryInfo::setBitrate(int aBitrate)
       
   260 {
       
   261     iBitrate = aBitrate;
       
   262 }
       
   263 
       
   264 
       
   265 
       
   266 EXPORT_C void IRQSongInfo::setSongName(const QString& aName)
       
   267 {
       
   268     iSongName = aName;
       
   269 }
       
   270 
       
   271 EXPORT_C const QString& IRQSongInfo::getSongName() const
       
   272 {
       
   273     return iSongName;
       
   274 }
       
   275 
       
   276 EXPORT_C void IRQSongInfo::setArtistName(const QString& aArtist)
       
   277 {
       
   278     iSongArtist = aArtist;
       
   279 }
       
   280 
       
   281 EXPORT_C const QString& IRQSongInfo::getArtistName() const
       
   282 {
       
   283     return iSongArtist;
       
   284 }
       
   285 
       
   286 EXPORT_C void IRQSongInfo::setMusicshopStatus(const QString& aStatus)
       
   287 {
       
   288     iMusicshopStatus = aStatus;
       
   289 }
       
   290 
       
   291 EXPORT_C const QString& IRQSongInfo::getMusicshopStatus() const
       
   292 {
       
   293     return iMusicshopStatus;
       
   294 }
       
   295 
       
   296 EXPORT_C void IRQSongInfo::setAllInfo(const QString& aName, const QString& aArtist, const QString& aStatus)
       
   297 {
       
   298     iSongName =   aName;
       
   299     iSongArtist = aArtist;
       
   300     iMusicshopStatus = aStatus;    
       
   301 }
       
   302 
       
   303 
       
   304