summaryrefslogtreecommitdiff
path: root/diskman/diskman.hh
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-02-11 13:41:10 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-02-11 13:41:10 -0600
commit9fa9857a7514469d062335cd2dcb8c0d06eb624c (patch)
treef488849c0e40438d738d03bbe7d7a8e4045ad6ab /diskman/diskman.hh
parent9e22e871de6e69026c8eebb1d966fa1f0c2edfcc (diff)
downloadhorizon-9fa9857a7514469d062335cd2dcb8c0d06eb624c.tar.gz
horizon-9fa9857a7514469d062335cd2dcb8c0d06eb624c.tar.bz2
horizon-9fa9857a7514469d062335cd2dcb8c0d06eb624c.tar.xz
horizon-9fa9857a7514469d062335cd2dcb8c0d06eb624c.zip
Enter DiskMan
Diffstat (limited to 'diskman/diskman.hh')
-rw-r--r--diskman/diskman.hh44
1 files changed, 44 insertions, 0 deletions
diff --git a/diskman/diskman.hh b/diskman/diskman.hh
new file mode 100644
index 0000000..ba9d4be
--- /dev/null
+++ b/diskman/diskman.hh
@@ -0,0 +1,44 @@
+/*
+ * diskman.hh - Public interface for the DiskMan library
+ * diskman, the Disk Manipulation library for
+ * Project Horizon
+ *
+ * Copyright (c) 2020 Adélie Linux and contributors. All rights reserved.
+ * This code is licensed under the AGPL 3.0 license, as noted in the
+ * LICENSE-code file in the root directory of this repository.
+ *
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+#ifndef DISKMAN__DISKMAN_HH
+#define DISKMAN__DISKMAN_HH
+
+#include <memory>
+#include <vector>
+
+#include "disk.hh"
+
+namespace Horizon {
+namespace DiskMan {
+
+class DiskMan {
+ struct impl;
+ std::unique_ptr<impl> pImpl;
+public:
+ DiskMan();
+ ~DiskMan();
+
+ /*! Find all available disks on this system.
+ * @param include_part Include partitions with disks.
+ * @param include_vg Include LVM volume groups as disks.
+ * @param include_lvm Include LVM volumes as disks.
+ */
+ std::vector<Disk> find_disks(bool include_part = true,
+ bool include_vg = true,
+ bool include_lvm = false);
+};
+
+}
+}
+
+#endif /* !DISKMAN__DISKMAN_HH */