summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-05 21:09:39 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-05 21:09:39 -0500
commit49ea3a98b9425a7269c0f9343c2876ffded26d2c (patch)
treef794a0ec75c6df33c8b5db40e4e474bf6c3a61bd
parentc0512bf3c20c8849670b0cf577d8118976ec0697 (diff)
downloadhorizon-49ea3a98b9425a7269c0f9343c2876ffded26d2c.tar.gz
horizon-49ea3a98b9425a7269c0f9343c2876ffded26d2c.tar.bz2
horizon-49ea3a98b9425a7269c0f9343c2876ffded26d2c.tar.xz
horizon-49ea3a98b9425a7269c0f9343c2876ffded26d2c.zip
More API work
-rw-r--r--hscript/disk.hh34
-rw-r--r--hscript/key.hh3
-rw-r--r--hscript/meta.hh21
-rw-r--r--hscript/network.hh25
-rw-r--r--hscript/script.cc11
-rw-r--r--hscript/user.hh31
6 files changed, 122 insertions, 3 deletions
diff --git a/hscript/disk.hh b/hscript/disk.hh
new file mode 100644
index 0000000..cddbb10
--- /dev/null
+++ b/hscript/disk.hh
@@ -0,0 +1,34 @@
+/*
+ * disk.hh - Definition of the disk Key classes
+ * libhscript, the HorizonScript library for
+ * Project Horizon
+ *
+ * Copyright (c) 2019 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
+ */
+
+#include "key.hh"
+
+namespace Horizon {
+namespace Keys {
+
+class DiskId : public Key {
+};
+
+class DiskLabel : public Key {
+};
+
+class Partition : public Key {
+};
+
+class Filesystem : public Key {
+};
+
+class Mount : public Key {
+};
+
+}
+}
diff --git a/hscript/key.hh b/hscript/key.hh
index 5a9613b..cce1460 100644
--- a/hscript/key.hh
+++ b/hscript/key.hh
@@ -21,9 +21,6 @@ namespace Keys {
*/
class Key {
public:
- /*! Create an instance of the Key. */
- static Key *create();
-
/*! Set the data associated with the Key. */
void setData(std::string data);
diff --git a/hscript/meta.hh b/hscript/meta.hh
new file mode 100644
index 0000000..c1eba90
--- /dev/null
+++ b/hscript/meta.hh
@@ -0,0 +1,21 @@
+/*
+ * meta.hh - Definition of the Key classes for system metadata
+ * libhscript, the HorizonScript library for
+ * Project Horizon
+ *
+ * Copyright (c) 2019 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
+ */
+
+#include "key.hh"
+
+namespace Horizon {
+namespace Keys {
+
+
+
+}
+}
diff --git a/hscript/network.hh b/hscript/network.hh
new file mode 100644
index 0000000..4c21155
--- /dev/null
+++ b/hscript/network.hh
@@ -0,0 +1,25 @@
+/*
+ * network.hh - Definition of the network Key classes
+ * libhscript, the HorizonScript library for
+ * Project Horizon
+ *
+ * Copyright (c) 2019 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
+ */
+
+#include "key.hh"
+
+namespace Horizon {
+namespace Keys {
+
+class NetAddress : public Key {
+};
+
+class NetSSID : public Key {
+};
+
+}
+}
diff --git a/hscript/script.cc b/hscript/script.cc
index 98c451d..72f9dd8 100644
--- a/hscript/script.cc
+++ b/hscript/script.cc
@@ -11,10 +11,21 @@
*/
#include "script.hh"
+#include "disk.hh"
namespace Horizon {
struct Script::ScriptPrivate {
+ /*! Determines whether or not to enable networking. */
+ bool network;
+ /*! The target system's hostname. */
+ std::string hostname;
+ /*! The packages to install to the target system. */
+ std::vector<std::string> packages;
+ /*! The root shadow line. */
+ std::string rootpw;
+ /*! Target system's mountpoints. */
+ std::vector< std::unique_ptr<Horizon::Keys::Mount> > mounts;
};
Script::Script() {
diff --git a/hscript/user.hh b/hscript/user.hh
new file mode 100644
index 0000000..af42519
--- /dev/null
+++ b/hscript/user.hh
@@ -0,0 +1,31 @@
+/*
+ * user.hh - Definition of the Key classes for user account data
+ * libhscript, the HorizonScript library for
+ * Project Horizon
+ *
+ * Copyright (c) 2019 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
+ */
+
+#include "key.hh"
+
+namespace Horizon {
+namespace Keys {
+
+class UserAlias : public Key {
+};
+
+class UserPassphrase : public Key {
+};
+
+class UserIcon : public Key {
+};
+
+class UserGroups : public Key {
+};
+
+}
+}