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