Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2577725
room_state.cpp
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
room_state.cpp
View Options
/******************************************************************************
* THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
*/
#include
<algorithm>
#include
"room_state.hpp"
namespace
Kazv
{
BaseJob
::
Query
SetRoomStateWithKeyJob::buildQuery
(
)
{
BaseJob
::
Query
_q
;
return
_q
;
}
BaseJob
::
Body
SetRoomStateWithKeyJob::buildBody
(
std
::
string
roomId
,
std
::
string
eventType
,
std
::
string
stateKey
,
JsonWrap
body
)
{
// ignore unused param
(
void
)(
roomId
);(
void
)(
eventType
);(
void
)(
stateKey
);(
void
)(
body
);
return
BaseJob
::
JsonBody
(
body
);
};
SetRoomStateWithKeyJob
::
SetRoomStateWithKeyJob
(
std
::
string
serverUrl
,
std
::
string
_accessToken
,
std
::
string
roomId
,
std
::
string
eventType
,
std
::
string
stateKey
,
JsonWrap
body
)
:
BaseJob
(
std
::
move
(
serverUrl
),
std
::
string
(
"/_matrix/client/r0"
)
+
"/rooms/"
+
roomId
+
"/state/"
+
eventType
+
"/"
+
stateKey
,
PUT
,
_accessToken
,
ReturnType
::
Json
,
buildBody
(
roomId
,
eventType
,
stateKey
,
body
)
,
buildQuery
()
)
{
}
bool
SetRoomStateWithKeyJob
::
success
(
Response
r
)
{
return
BaseJob
::
success
(
r
)
&&
isBodyJson
(
r
.
body
)
&&
jsonBody
(
r
).
get
().
contains
(
"event_id"
s
)
;
}
std
::
string
SetRoomStateWithKeyJob
::
eventId
(
Response
r
)
{
if
(
jsonBody
(
r
).
get
()
.
contains
(
"event_id"
s
))
{
return
jsonBody
(
r
).
get
()[
"event_id"
s
]
/*.get<std::string>()*/
;}
else
{
return
std
::
string
(
);}
}
}
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Tue, Jun 24, 12:53 PM (1 d, 19 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
234868
Default Alt Text
room_state.cpp (1 KB)
Attached To
Mode
rL libkazv
Attached
Detach File
Event Timeline
Log In to Comment