Sayonara Player
MTP_Track.h
1 
2 /* Copyright (C) 2011-2017 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 #ifndef MTP_TRACK_H
21 #define MTP_TRACK_H
22 
23 #include "MTP_Typedefs.h"
24 
25 class MetaData;
30 class MTP_Track
31 {
32  friend struct MTP_Folder;
33 
34 private:
35  MTPIntern_Track* _track=nullptr;
36  QString _src_filename;
37 
38 
39  // this is needed to send a track, only available for MTP_Folder
40  MTPIntern_Track* metadata() const;
41 
42  void set_folder_id(quint32 folder_id);
43  void set_storage_id(quint32 storage_id);
44 
45  void read_metadata(const MetaData& md);
46 
47 
48 public:
49  explicit MTP_Track(const MetaData& md);
50  explicit MTP_Track(const QString& filename);
51  virtual ~MTP_Track();
52 
53  QString src_filename() const;
54 
55  MetaData export_metadata();
56 };
57 
58 #endif // MTP_TRACK_H
The MTP_Track class.
Definition: MTP_Track.h:30
The MTP_Folder struct.
Definition: MTP_Folder.h:29
The MetaData class.
Definition: MetaData.h:55
LIBMTP_track_t MTPIntern_Track
MTPIntern_Track.
Definition: MTP_Typedefs.h:120