// SPDX-FileCopyrightText: 2023 g10 code Gmbh
// SPDX-Contributor: Carl Schwan <carl.schwan@gnupg.com>
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include <QHash>
#include <QNetworkAccessManager>
#include <QString>

using Token = QByteArray;
using ClientId = QString;
using Email = QString;
using Port = int;

struct Client {
    using Id = QString;
    Id id;
    Port port;
};

class ServerState
{
public:
    static ServerState &instance();

    QHash<Email, Client> clients;

    QNetworkAccessManager qnam;

    QHash<Token, Email> composerRequest;

private:
    ServerState();
};
