summaryrefslogtreecommitdiff
path: root/hscript/network.cc
blob: e5ca787057439160ad5a05a210a47e18319d4b09 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
 * network.cc - Implementation of the Key classes for network configuration
 * 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 "network.hh"

using namespace Horizon::Keys;

Key *Network::parseFromData(const std::string data, int lineno, int *errors,
                            int *warnings) {
    bool value;
    if(!BooleanKey::parse(data, "installfile:" + std::to_string(lineno),
                          "network", &value)) {
        if(errors) *errors += 1;
        return nullptr;
    }
    return new Network(lineno, value);
}

bool Network::execute(ScriptOptions) const {
    return false;
}

Key *NetAddress::parseFromData(const std::string data, int lineno, int *errors,
                               int *warnings) {
    return nullptr;
}

bool NetAddress::validate(ScriptOptions) const {
    return false;
}

bool NetAddress::execute(ScriptOptions) const {
    return false;
}