mpdata/inc/mpsongdata_p.h
changeset 43 0f32e550d9d8
equal deleted inserted replaced
38:b93f525c9244 43:0f32e550d9d8
       
     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: Metadata of song for details view - private implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef MPSONGDATA_P_H
       
    19 #define MPSONGDATA_P_H
       
    20 
       
    21 #include "mpsongdata.h"
       
    22 
       
    23 class CMPXMedia;
       
    24 class ThumbnailManager;
       
    25 
       
    26 class MpSongDataPrivate
       
    27 {
       
    28 public:
       
    29     explicit MpSongDataPrivate( MpSongData *wrapper, ThumbnailManager *thumbnailManager );
       
    30     virtual ~MpSongDataPrivate();
       
    31 
       
    32     QString title() const;
       
    33     QString album() const;
       
    34     QString artist() const;
       
    35     QString comment() const;
       
    36     void albumArt( HbIcon& icon ) const;
       
    37     QString year() const;
       
    38     QString genre() const;
       
    39     QString composer() const;
       
    40     QString albumTrack() const;
       
    41     QString link() const;
       
    42     QString fileName() const;
       
    43     QString mimeType() const;
       
    44     QString duration() const;
       
    45     QString bitRate() const;
       
    46     QString sampleRate() const;
       
    47     QString size() const;
       
    48     QString modified() const;
       
    49     QString copyright() const;
       
    50     QString musicURL() const;
       
    51     bool isDrmProtected() const;
       
    52 
       
    53     QString albumArtBase64() const;
       
    54     void removeAlbumArtFile() const; //TODO: Remove when base64 starts to work
       
    55 
       
    56     void setLink( const QString &link );
       
    57     void setMpxMedia( const CMPXMedia& aMedia );
       
    58 
       
    59     int reservedLength() const;
       
    60     void thumbnailReady( QPixmap pixmap, void *data, int id, int error );
       
    61 
       
    62 private:
       
    63 
       
    64     void DoSetMpxMediaL( const CMPXMedia& aMedia );
       
    65 
       
    66     bool setTitle( const QString &title );
       
    67     bool setAlbum( const QString &album );
       
    68     bool setArtist( const QString &artist );
       
    69     bool setComment( const QString &comment );
       
    70     void setAlbumArtUri( const QString &albumArtUri );
       
    71     bool setYear( int date );
       
    72     bool setGenre( const QString &genre );
       
    73     bool setComposer( const QString &compoer );
       
    74     bool setAlbumTrack( const QString &albumtrack );
       
    75     bool setFileName( const QString &fileName );
       
    76     bool setMimeType( const QString &mimeType );
       
    77     bool setDuration( int duration );
       
    78     bool setBitRate( int bitRate);
       
    79     bool setSampleRate( int sampleRate );
       
    80     bool setSize( int size );
       
    81     bool setModified( const QString &modified );
       
    82     bool setCopyright( const QString &copyright );
       
    83     bool setMusicURL( const QString &musicURL );
       
    84     bool setDrmProtected( bool drmProtected );
       
    85 
       
    86 private:
       
    87 
       
    88     MpSongData          *q_ptr;
       
    89 
       
    90     ThumbnailManager    *mThumbnailManager; // Not owned
       
    91     TInt                mReqId;
       
    92 
       
    93     QString             mTitle;
       
    94     QString             mAlbum;
       
    95     QString             mArtist;
       
    96     QString             mComment;
       
    97     QString             mComposer;
       
    98     QString             mGenre;
       
    99     QString             mYear;
       
   100     QString             mAlbumTrack;
       
   101     HbIcon              *mAlbumArt;
       
   102     HbIcon              *mDefaultAlbumArt;
       
   103     QString             currentAAUri;
       
   104     QString             mLink;
       
   105     QString             mFileName;
       
   106     QString             mMimeType;
       
   107     QString             mDuration;
       
   108     QString             mBitRate;
       
   109     QString             mSampleRate;
       
   110     QString             mSize;
       
   111     QString             mModified;
       
   112     QString             mCopyright;
       
   113     QString             mMusicURL;
       
   114     bool                mDrmProtected;
       
   115     QString             mTempAlbumArt; //TODO: Remove when base64 starts to work
       
   116 
       
   117 };
       
   118 
       
   119 #endif // MPSONGDATA_P_H