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

0001 /****************************************************************************************
0002  * Copyright (c) 2009 Alejandro Wainzinger <aikawarazuni@gmail.com>                     *
0003  *                                                                                      *
0004  * This program is free software; you can redistribute it and/or modify it under        *
0005  * the terms of the GNU General Public License as published by the Free Software        *
0006  * Foundation; either version 2 of the License, or (at your option) any later           *
0007  * version.                                                                             *
0008  *                                                                                      *
0009  * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
0010  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
0011  * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
0012  *                                                                                      *
0013  * You should have received a copy of the GNU General Public License along with         *
0014  * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
0015  ****************************************************************************************/
0016 
0017 #include "MtpWriteCapability.h"
0018 #include "MtpHandler.h"
0019 
0020 using namespace Handler;
0021 
0022 MtpWriteCapability::MtpWriteCapability( Meta::MtpHandler *handler )
0023         : Handler::WriteCapability( handler )
0024         , m_handler( handler )
0025 {
0026 }
0027 
0028 QStringList
0029 MtpWriteCapability::supportedFormats()
0030 {
0031     return m_handler->supportedFormats();
0032 }
0033 
0034 void
0035 MtpWriteCapability::findPathToCopy( const Meta::TrackPtr &srcTrack, const Meta::MediaDeviceTrackPtr &destTrack )
0036 {
0037     m_handler->findPathToCopy( srcTrack, destTrack );
0038 }
0039 
0040 
0041 bool
0042 MtpWriteCapability::libCopyTrack( const Meta::TrackPtr &srcTrack, Meta::MediaDeviceTrackPtr &destTrack )
0043 {
0044     return m_handler->libCopyTrack( srcTrack, destTrack );
0045 }
0046 
0047 
0048 bool
0049 MtpWriteCapability::libDeleteTrackFile( const Meta::MediaDeviceTrackPtr &track )
0050 {
0051     return m_handler->libDeleteTrackFile( track );
0052 }
0053 
0054 
0055 void
0056 MtpWriteCapability::libCreateTrack( const Meta::MediaDeviceTrackPtr &track )
0057 {
0058     m_handler->libCreateTrack( track );
0059 }
0060 
0061 
0062 void
0063 MtpWriteCapability::libDeleteTrack( const Meta::MediaDeviceTrackPtr &track )
0064 {
0065     m_handler->libDeleteTrack( track );
0066 }
0067 
0068 
0069 void
0070 MtpWriteCapability::addTrackInDB( const Meta::MediaDeviceTrackPtr &track )
0071 {
0072     m_handler->addTrackInDB( track );
0073 }
0074 
0075 
0076 void
0077 MtpWriteCapability::removeTrackFromDB( const Meta::MediaDeviceTrackPtr &track )
0078 {
0079     m_handler->removeTrackFromDB( track );
0080 }
0081 
0082 
0083 void
0084 MtpWriteCapability::setDatabaseChanged()
0085 {
0086     m_handler->setDatabaseChanged();
0087 }
0088 
0089 
0090 void
0091 MtpWriteCapability::libSetTitle( Meta::MediaDeviceTrackPtr &track, const QString& title )
0092 {
0093     m_handler->libSetTitle( track, title );
0094 }
0095 
0096 
0097 void
0098 MtpWriteCapability::libSetAlbum( Meta::MediaDeviceTrackPtr &track, const QString& album )
0099 {
0100     m_handler->libSetAlbum( track, album );
0101 }
0102 
0103 
0104 void
0105 MtpWriteCapability::libSetArtist( Meta::MediaDeviceTrackPtr &track, const QString& artist )
0106 {
0107     m_handler->libSetArtist( track, artist );
0108 }
0109 
0110 void
0111 MtpWriteCapability::libSetAlbumArtist( Meta::MediaDeviceTrackPtr &track, const QString &albumArtist )
0112 {
0113     m_handler->libSetAlbumArtist( track, albumArtist );
0114 }
0115 
0116 void
0117 MtpWriteCapability::libSetComposer( Meta::MediaDeviceTrackPtr &track, const QString& composer )
0118 {
0119     m_handler->libSetComposer( track, composer );
0120 }
0121 
0122 
0123 void
0124 MtpWriteCapability::libSetGenre( Meta::MediaDeviceTrackPtr &track, const QString& genre )
0125 {
0126     m_handler->libSetGenre( track, genre );
0127 }
0128 
0129 
0130 void
0131 MtpWriteCapability::libSetYear( Meta::MediaDeviceTrackPtr &track, const QString& year )
0132 {
0133     m_handler->libSetYear( track, year );
0134 }
0135 
0136 
0137 void
0138 MtpWriteCapability::libSetLength( Meta::MediaDeviceTrackPtr &track, int length )
0139 {
0140     m_handler->libSetLength( track, length );
0141 }
0142 
0143 
0144 void
0145 MtpWriteCapability::libSetTrackNumber( Meta::MediaDeviceTrackPtr &track, int tracknum )
0146 {
0147     m_handler->libSetTrackNumber( track, tracknum );
0148 }
0149 
0150 
0151 void
0152 MtpWriteCapability::libSetComment( Meta::MediaDeviceTrackPtr &track, const QString& comment )
0153 {
0154     m_handler->libSetComment( track, comment );
0155 }
0156 
0157 
0158 void
0159 MtpWriteCapability::libSetDiscNumber( Meta::MediaDeviceTrackPtr &track, int discnum )
0160 {
0161     m_handler->libSetDiscNumber( track, discnum );
0162 }
0163 
0164 
0165 void
0166 MtpWriteCapability::libSetBitrate( Meta::MediaDeviceTrackPtr &track, int bitrate )
0167 {
0168     m_handler->libSetBitrate( track, bitrate );
0169 }
0170 
0171 
0172 void
0173 MtpWriteCapability::libSetSamplerate( Meta::MediaDeviceTrackPtr &track, int samplerate )
0174 {
0175     m_handler->libSetSamplerate( track, samplerate );
0176 }
0177 
0178 
0179 void
0180 MtpWriteCapability::libSetBpm( Meta::MediaDeviceTrackPtr &track, qreal bpm )
0181 {
0182     m_handler->libSetBpm( track, bpm );
0183 }
0184 
0185 
0186 void
0187 MtpWriteCapability::libSetFileSize( Meta::MediaDeviceTrackPtr &track, int filesize )
0188 {
0189     m_handler->libSetFileSize( track, filesize );
0190 }
0191 
0192 
0193 void
0194 MtpWriteCapability::libSetPlayCount( Meta::MediaDeviceTrackPtr &track, int playcount )
0195 {
0196     m_handler->libSetPlayCount( track, playcount );
0197 }
0198 
0199 void
0200 MtpWriteCapability::libSetLastPlayed( Meta::MediaDeviceTrackPtr &track, const QDateTime &lastplayed )
0201 {
0202     m_handler->libSetLastPlayed( track, lastplayed );
0203 }
0204 
0205 void
0206 MtpWriteCapability::libSetRating( Meta::MediaDeviceTrackPtr &track, int rating )
0207 {
0208     m_handler->libSetRating( track, rating );
0209 }
0210 
0211 void
0212 MtpWriteCapability::libSetType( Meta::MediaDeviceTrackPtr &track, const QString& type )
0213 {
0214     m_handler->libSetType( track, type );
0215 }
0216 
0217 void
0218 MtpWriteCapability::libSetPlayableUrl( Meta::MediaDeviceTrackPtr &destTrack, const Meta::TrackPtr &srcTrack )
0219 {
0220     m_handler->libSetPlayableUrl( destTrack, srcTrack );
0221 }
0222 
0223 void
0224 MtpWriteCapability::libSetCoverArt( Meta::MediaDeviceTrackPtr &track, const QImage &cover )
0225 {
0226     AMAROK_NOTIMPLEMENTED
0227     Q_UNUSED( track )
0228     Q_UNUSED( cover )
0229 }
0230 
0231 void
0232 MtpWriteCapability::prepareToCopy()
0233 {
0234     m_handler->prepareToCopy();
0235 }
0236 
0237 
0238 void
0239 MtpWriteCapability::prepareToDelete()
0240 {
0241     m_handler->prepareToDelete();
0242 }
0243 
0244 void
0245 MtpWriteCapability::updateTrack( Meta::MediaDeviceTrackPtr &track )
0246 {
0247     m_handler->updateTrack( track );
0248 }
0249