gio-qt 0.0.16
Loading...
Searching...
No Matches
dgiomount.h
1// SPDX-FileCopyrightText: 2019 - 2022 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DGIOMOUNT_H
6#define DGIOMOUNT_H
7
8#include <QObject>
9#include <QSharedData>
10
11namespace Gio {
12class Mount;
13}
14
15class DGioFile;
16class DGioVolume;
17class DGioMountPrivate;
18class DGioMount : public QObject, public QSharedData
19{
20 Q_OBJECT
21public:
22 explicit DGioMount(Gio::Mount *gmmMountPtr, QObject *parent = nullptr);
23 ~DGioMount();
24
25 static DGioMount * createFromPath(QString path, QObject *parent = nullptr);
26
27 QString name() const;
28 QString uuid() const;
29 QString mountClass() const;
30 bool isShadowed() const;
31 bool canUnmount() const;
32 bool canEject() const;
33 QString sortKey() const;
34 QStringList themedIconNames() const;
35 QStringList themedSymbolicIconNames() const;
36
37 void unmount(bool forceUnmount = false);
38 void eject(bool forceEject = false);
39
40 QExplicitlySharedDataPointer<DGioFile> getRootFile();
41 QExplicitlySharedDataPointer<DGioFile> getDefaultLocationFile();
42 QExplicitlySharedDataPointer<DGioVolume> getVolume();
43
44private:
45 QScopedPointer<DGioMountPrivate> d_ptr;
46
47 Q_DECLARE_PRIVATE(DGioMount)
48};
49
50#endif // DGIOMOUNT_H
Definition dgiofile.h:31
static DGioMount * createFromPath(QString path, QObject *parent=nullptr)
Create a DGioMount instance by a given path.
Definition dgiomount.cpp:85
bool isShadowed() const
Determines if mount is shadowed.
Definition dgiomount.cpp:142
Definition dgiovolume.h:27