Sayonara Player
MTP_Track.h
1 
2 /* Copyright (C) 2011-2016 Lucio Carreras
3  *
4  * This file is part of sayonara player
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10 
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15 
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 
21 
22 
23 #ifndef MTP_TRACK_H
24 #define MTP_TRACK_H
25 
26 #include "Helper/MetaData/MetaData.h"
27 
28 #include "MTP_Typedefs.h"
29 
34 class MTP_Track {
35 
36  friend struct MTP_Folder;
37 
38 private:
39  MTPIntern_Track* _track=nullptr;
40  QString _src_filename;
41 
42 
43  // this is needed to send a track, only available for MTP_Folder
44  MTPIntern_Track* metadata() const;
45 
46  void set_folder_id(quint32 folder_id);
47  void set_storage_id(quint32 storage_id);
48 
49  void read_metadata(const MetaData& md);
50 
51 
52 public:
53  MTP_Track(const MetaData& md);
54  MTP_Track(const QString& filename);
55  virtual ~MTP_Track();
56 
57  QString src_filename() const;
58 
59  MetaData export_metadata();
60 };
61 
62 
63 #endif // MTP_TRACK_H
The MTP_Track class.
Definition: MTP_Track.h:34
The MTP_Folder struct.
Definition: MTP_Folder.h:32
Definition: MetaData.h:49
LIBMTP_track_t MTPIntern_Track
MTPIntern_Track.
Definition: MTP_Typedefs.h:123