Sayonara Player
MTP_Folder.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_FOLDER_H
24 #define MTP_FOLDER_H
25 
26 #include "MTP_Typedefs.h"
27 
32 struct MTP_Folder {
33 
34 private:
35  MTPIntern_Folder* _folder=nullptr;
36  MTPIntern_Device* _device=nullptr;
37 
38  quint32 _id;
39  QString _name;
40  quint32 _parent_id;
41  quint32 _storage_id;
42  bool _has_next;
43 
44 
45 public:
46  MTP_Folder(MTPIntern_Device* device=nullptr, MTPIntern_Folder* folder=nullptr);
47  virtual ~MTP_Folder();
48 
49  quint32 id() const;
50  QString name() const;
51  quint32 parent_id() const;
52  quint32 storage_id() const;
53 
54  QList<MTP_FolderPtr> children() const;
55  QList<MTP_FolderPtr> siblings() const;
56 
57 
58  bool send_track(MTP_TrackPtr track) const;
59  bool remove() const;
60  quint32 create_folder(const QString& name) const;
61 };
62 
63 
64 
65 
66 
67 
68 #endif // MTP_FOLDER_H
The MTP_Folder struct.
Definition: MTP_Folder.h:32
std::shared_ptr< MTP_Track > MTP_TrackPtr
MTP_TrackPtr.
Definition: MTP_Typedefs.h:129
LIBMTP_mtpdevice_t MTPIntern_Device
MTPIntern_Device.
Definition: MTP_Typedefs.h:63
LIBMTP_folder_t MTPIntern_Folder
MTPIntern_Folder.
Definition: MTP_Typedefs.h:87