src/Configuration.h
author František Kučera <franta-hg@frantovo.cz>
Thu, 18 Aug 2022 03:39:55 +0200
branchv_0
changeset 22 9a7c42cca24b
parent 8 3e17086fffea
permissions -rw-r--r--
SCTP: sendmsg()
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     1
/**
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     2
 * Relational pipes
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     3
 * Copyright © 2022 František Kučera (Frantovo.cz, GlobalCode.info)
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     4
 *
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     5
 * This program is free software: you can redistribute it and/or modify
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     7
 * the Free Software Foundation, version 3 of the License.
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     8
 *
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    12
 * GNU General Public License for more details.
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    13
 *
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    15
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    16
 */
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    17
#pragma once
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    18
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    19
#include <vector>
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    20
#include <iostream>
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    21
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    22
#include <relpipe/common/type/typedefs.h>
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    23
5
e57e2a2798b2 configuration: protocol, role, mode, host, port, path
František Kučera <franta-hg@frantovo.cz>
parents: 4
diff changeset
    24
#include "Socket.h"
e57e2a2798b2 configuration: protocol, role, mode, host, port, path
František Kučera <franta-hg@frantovo.cz>
parents: 4
diff changeset
    25
0
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    26
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    27
namespace relpipe {
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    28
namespace out {
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    29
namespace socket {
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    30
5
e57e2a2798b2 configuration: protocol, role, mode, host, port, path
František Kučera <franta-hg@frantovo.cz>
parents: 4
diff changeset
    31
0
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    32
class Configuration {
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    33
public:
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    34
4
8d036e5e5fcc configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    35
	class SocketOption {
8d036e5e5fcc configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    36
	public:
8d036e5e5fcc configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    37
		const relpipe::common::type::StringX name;
8d036e5e5fcc configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    38
		const relpipe::common::type::StringX value;
8d036e5e5fcc configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    39
8d036e5e5fcc configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    40
		SocketOption(const relpipe::common::type::StringX name, const relpipe::common::type::StringX value) : name(name), value(value) {
8d036e5e5fcc configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    41
		}
8d036e5e5fcc configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    42
8d036e5e5fcc configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    43
		virtual ~SocketOption() = default;
8d036e5e5fcc configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    44
	};
8d036e5e5fcc configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    45
8d036e5e5fcc configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    46
8
3e17086fffea process only relations named 'message' or matching the --relation pattern
František Kučera <franta-hg@frantovo.cz>
parents: 7
diff changeset
    47
	relpipe::common::type::StringX relation = L"message";
4
8d036e5e5fcc configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    48
	std::vector<SocketOption> options;
0
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    49
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    50
	virtual ~Configuration() {
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    51
	}
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    52
};
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    53
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    54
}
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    55
}
924e354948df establish project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    56
}