6#include <sonde/sonde_core_export.h>
8#include <QtCore/QString>
9#include <QtNetwork/QHostAddress>
13namespace Sonde::Instance {
40quint64
keyBits(
const QString &path);
48std::optional<PortRange>
portRange(
const QString &value, QString *error);
52SONDE_CORE_EXPORT std::optional<PortRange>
portRange(
const QString &value,
53 const QString &executable, QString *error);
63std::optional<QString>
expandHttp(
const QString &value, QString *error);
66SONDE_CORE_EXPORT std::optional<QString>
expandHttp(
const QString &value,
const QString &executable,
QString executablePath()
canonicalPath() of the application's executable.
Definition instance.cpp:79
quint16 freePort(const QHostAddress &host, const PortRange &range)
The first port of range, from its first choice on and wrapping around, that host can listen on right ...
Definition instance.cpp:136
QString canonicalPath(const QString &path)
path as sonde computes it too: absolute, with links resolved, or empty if it doesn't exist.
Definition instance.cpp:67
QString expandLocal(const QString &value)
value with {instance} replaced by the instance key.
Definition instance.cpp:93
std::optional< QString > expandHttp(const QString &value, QString *error)
value with {instance} or {instance:<low>-<high>} replaced by the key's first-choice port.
Definition instance.cpp:148
quint64 keyBits(const QString &path)
The 33-bit number behind the instance key of path.
Definition instance.cpp:84
std::optional< PortRange > portRange(const QString &value, QString *error)
The range of {instance} or {instance:<low>-<high>} in value.
Definition instance.cpp:110
constexpr quint16 kDefaultPortLow
The first port of the default {instance} range (design 0019: away from common development ports,...
Definition instance_p.h:17
constexpr quint16 kDefaultPortHigh
The last port of the default {instance} range.
Definition instance_p.h:19
The ports {instance} in a SONDE_HTTP value may use, and the first choice.
Definition instance_p.h:23
quint16 first
The key's choice, tried first.
Definition instance_p.h:26
quint16 high
Last port of the range.
Definition instance_p.h:25
quint16 low
First port of the range.
Definition instance_p.h:24