source: calamares/trunk/fuentes/src/modules/partition/core/DeviceList.h @ 7538

Last change on this file since 7538 was 7538, checked in by kbut, 13 months ago

sync with github

File size: 1.7 KB
Line 
1/* === This file is part of Calamares - <https://github.com/calamares> ===
2 *
3 *   Copyright 2014-2017, Teo Mrnjavac <teo@kde.org>
4 *   Copyright 2017, Adriaan de Groot <groot@kde.org>
5 *
6 *   Calamares 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 *   Calamares 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 Calamares. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef DEVICELIST_H
21#define DEVICELIST_H
22
23#include <QList>
24#include <QString>
25
26class Device;
27
28namespace PartUtils
29{
30
31enum class DeviceType { All, WritableOnly };
32
33/**
34 * @brief Gets a list of storage devices.
35 * @param which Can be used to select from all the devices in
36 *      the system, filtering out those that do not meet a criterium.
37 *      If set to WritableOnly, only devices which can be overwritten
38 *      safely are returned (e.g. RO-media are ignored, as are mounted partitions).
39 * @param minimumSize Can be used to filter devices based on their
40 *      size (in bytes). If non-negative, only devices with a size
41 *      greater than @p minimumSize will be returned.
42 * @return a list of Devices meeting this criterium.
43 */
44QList< Device* > getDevices( DeviceType which = DeviceType::All, qint64 minimumSize = -1 );
45
46}
47
48#endif // DEVICELIST_H
Note: See TracBrowser for help on using the repository browser.