File indexing completed on 2025-01-05 04:26:03

0001 /****************************************************************************************
0002  * Copyright (c) 2009 Alejandro Wainzinger <aikawarazuni@gmail.com>                     *
0003  * Copyright (c) 2009 Mark Kretschmann <kretschmann@kde.org>                            *
0004  *                                                                                      *
0005  * This program is free software; you can redistribute it and/or modify it under        *
0006  * the terms of the GNU General Public License as published by the Free Software        *
0007  * Foundation; either version 2 of the License, or (at your option) any later           *
0008  * version.                                                                             *
0009  *                                                                                      *
0010  * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
0011  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
0012  * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
0013  *                                                                                      *
0014  * You should have received a copy of the GNU General Public License along with         *
0015  * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
0016  ****************************************************************************************/
0017 
0018 #include "MtpReadCapability.h"
0019 #include "MtpHandler.h"
0020 
0021 using namespace Handler;
0022 
0023 
0024 MtpReadCapability::MtpReadCapability( Meta::MtpHandler *handler )
0025     : Handler::ReadCapability( handler )
0026     , m_handler( handler )
0027 {}
0028 
0029 void
0030 MtpReadCapability::prepareToParseTracks()
0031 {
0032     if( m_handler )
0033         m_handler->prepareToParseTracks();
0034 }
0035 
0036 bool
0037 MtpReadCapability::isEndOfParseTracksList()
0038 {
0039     return m_handler->isEndOfParseTracksList();
0040 }
0041 
0042 void
0043 MtpReadCapability::prepareToParseNextTrack()
0044 {
0045     if( m_handler )
0046         m_handler->prepareToParseNextTrack();
0047 }
0048 
0049 void
0050 MtpReadCapability::nextTrackToParse()
0051 {
0052     if( m_handler )
0053         m_handler->nextTrackToParse();
0054 }
0055 
0056 void
0057 MtpReadCapability::setAssociateTrack( const Meta::MediaDeviceTrackPtr track )
0058 {
0059     if( m_handler )
0060         m_handler->setAssociateTrack( track );
0061 }
0062 
0063 QString
0064 MtpReadCapability::libGetTitle( const Meta::MediaDeviceTrackPtr &track )
0065 {
0066     return m_handler->libGetTitle( track );
0067 }
0068 
0069 QString
0070 MtpReadCapability::libGetAlbum( const Meta::MediaDeviceTrackPtr &track )
0071 {
0072     return m_handler->libGetAlbum( track );
0073 }
0074 
0075 QString
0076 MtpReadCapability::libGetArtist( const Meta::MediaDeviceTrackPtr &track )
0077 {
0078     return m_handler->libGetArtist( track );
0079 }
0080 
0081 QString
0082 MtpReadCapability::libGetAlbumArtist( const Meta::MediaDeviceTrackPtr &track )
0083 {
0084     return m_handler->libGetAlbumArtist( track );
0085 }
0086 
0087 QString
0088 MtpReadCapability::libGetComposer( const Meta::MediaDeviceTrackPtr &track )
0089 {
0090     return m_handler->libGetComposer( track );
0091 }
0092 
0093 QString
0094 MtpReadCapability::libGetGenre( const Meta::MediaDeviceTrackPtr &track )
0095 {
0096     return m_handler->libGetGenre( track );
0097 }
0098 
0099 int
0100 MtpReadCapability::libGetYear( const Meta::MediaDeviceTrackPtr &track )
0101 {
0102     return m_handler->libGetYear( track );
0103 }
0104 
0105 qint64
0106 MtpReadCapability::libGetLength( const Meta::MediaDeviceTrackPtr &track )
0107 {
0108     return m_handler->libGetLength( track );
0109 }
0110 
0111 int
0112 MtpReadCapability::libGetTrackNumber( const Meta::MediaDeviceTrackPtr &track )
0113 {
0114    return  m_handler->libGetTrackNumber( track );
0115 }
0116 
0117 QString
0118 MtpReadCapability::libGetComment( const Meta::MediaDeviceTrackPtr &track )
0119 {
0120     return m_handler->libGetComment( track );
0121 }
0122 
0123 int
0124 MtpReadCapability::libGetDiscNumber( const Meta::MediaDeviceTrackPtr &track )
0125 {
0126    return  m_handler->libGetDiscNumber( track );
0127 }
0128 
0129 int
0130 MtpReadCapability::libGetBitrate( const Meta::MediaDeviceTrackPtr &track )
0131 {
0132     return m_handler->libGetBitrate( track );
0133 }
0134 
0135 int
0136 MtpReadCapability::libGetSamplerate( const Meta::MediaDeviceTrackPtr &track )
0137 {
0138     return m_handler->libGetSamplerate( track );
0139 }
0140 
0141 qreal
0142 MtpReadCapability::libGetBpm( const Meta::MediaDeviceTrackPtr &track )
0143 {
0144     return m_handler->libGetBpm( track );
0145 }
0146 
0147 int
0148 MtpReadCapability::libGetFileSize( const Meta::MediaDeviceTrackPtr &track )
0149 {
0150     return m_handler->libGetFileSize( track );
0151 }
0152 
0153 int
0154 MtpReadCapability::libGetPlayCount( const Meta::MediaDeviceTrackPtr &track )
0155 {
0156     return m_handler->libGetPlayCount( track );
0157 }
0158 
0159 QDateTime
0160 MtpReadCapability::libGetLastPlayed( const Meta::MediaDeviceTrackPtr &track )
0161 {
0162     return m_handler->libGetLastPlayed( track );
0163 }
0164 
0165 int
0166 MtpReadCapability::libGetRating( const Meta::MediaDeviceTrackPtr &track )
0167 {
0168     return m_handler->libGetRating( track );
0169 }
0170 
0171 QString
0172 MtpReadCapability::libGetType( const Meta::MediaDeviceTrackPtr &track )
0173 {
0174     return m_handler->libGetType( track );
0175 }
0176 
0177 QUrl
0178 MtpReadCapability::libGetPlayableUrl( const Meta::MediaDeviceTrackPtr &track )
0179 {
0180     return m_handler->libGetPlayableUrl( track );
0181 }
0182 
0183 float
0184 MtpReadCapability::usedCapacity() const
0185 {
0186     return m_handler->usedCapacity();
0187 }
0188 
0189 float
0190 MtpReadCapability::totalCapacity() const
0191 {
0192     return m_handler->totalCapacity();
0193 }
0194