Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F7892123
client.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
client.hpp
View Options
#pragma once
#include
<tuple>
#include
<variant>
#include
<string>
#include
<optional>
#include
<lager/context.hpp>
#include
"job/jobinterface.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
{};
struct
SyncAction
{
std
::
string
since
;
};
using
Action
=
std
::
variant
<
LoginAction
,
LogoutAction
,
LoadUserInfoAction
,
SyncAction
,
Error
::
Action
>
;
using
Effect
=
lager
::
effect
<
Action
,
lager
::
deps
<
JobInterface
&>>
;
using
Result
=
std
::
pair
<
Client
,
Effect
>
;
static
Result
update
(
Client
m
,
Action
a
);
};
Client
::
Effect
syncEffect
(
Client
m
,
Client
::
SyncAction
a
);
}
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Thu, Oct 2, 4:13 AM (10 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
485504
Default Alt Text
client.hpp (1 KB)
Attached To
Mode
rL libkazv
Attached
Detach File
Event Timeline
Log In to Comment