Page MenuHomePhorge

client.hpp
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

client.hpp

#pragma once
#include <tuple>
#include <variant>
#include <string>
#include <lager/context.hpp>
#include "error.hpp"
namespace Kazv
{
struct Client
{
std::string serverUrl;
std::string userId;
std::string token;
std::string deviceId;
bool loggedIn;
Error error;
struct LoginAction {
std::string serverUrl;
std::string username;
std::string password;
std::optional<std::string> deviceName;
};
struct LoadUserInfoAction {
std::string serverUrl;
std::string userId;
std::string token;
std::string deviceId;
bool loggedIn;
};
struct LogoutAction {};
using Action = std::variant<LoginAction,
LogoutAction,
LoadUserInfoAction,
Error::Action
>;
using Result = std::pair<Client, lager::effect<Action>>;
static Result update(Client m, Action a);
};
}

File Metadata

Mime Type
text/x-c++
Expires
Thu, Oct 2, 2:12 AM (19 h, 49 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
486898
Default Alt Text
client.hpp (1 KB)

Event Timeline