Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2697749
room_send.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
room_send.cpp
View Options
/******************************************************************************
* THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
*/
#include
<algorithm>
#include
"room_send.hpp"
namespace
Kazv
::
Api
{
BaseJob
::
Query
SendMessageJob::buildQuery
(
)
{
BaseJob
::
Query
_q
;
return
_q
;
}
BaseJob
::
Body
SendMessageJob::buildBody
(
std
::
string
roomId
,
std
::
string
eventType
,
std
::
string
txnId
,
JsonWrap
body
)
{
// ignore unused param
(
void
)(
roomId
);(
void
)(
eventType
);(
void
)(
txnId
);(
void
)(
body
);
return
JsonBody
(
body
);
};
SendMessageJob
::
SendMessageJob
(
std
::
string
serverUrl
,
std
::
string
_accessToken
,
std
::
string
roomId
,
std
::
string
eventType
,
std
::
string
txnId
,
JsonWrap
body
)
:
BaseJob
(
std
::
move
(
serverUrl
),
std
::
string
(
"/_matrix/client/r0"
)
+
"/rooms/"
+
roomId
+
"/send/"
+
eventType
+
"/"
+
txnId
,
PUT
,
std
::
string
(
"SendMessage"
),
_accessToken
,
ReturnType
::
Json
,
buildBody
(
roomId
,
eventType
,
txnId
,
body
)
,
buildQuery
()
,
{}
)
{
}
SendMessageJob
SendMessageJob
::
withData
(
JsonWrap
j
)
&&
{
auto
ret
=
SendMessageJob
(
std
::
move
(
*
this
));
ret
.
attachData
(
j
);
return
ret
;
}
SendMessageJob
SendMessageJob
::
withData
(
JsonWrap
j
)
const
&
{
auto
ret
=
SendMessageJob
(
*
this
);
ret
.
attachData
(
j
);
return
ret
;
}
SendMessageJob
::
JobResponse
::
JobResponse
(
Response
r
)
:
Response
(
std
::
move
(
r
))
{}
bool
SendMessageResponse
::
success
()
const
{
return
Response
::
success
()
&&
isBodyJson
(
body
)
&&
jsonBody
().
get
().
contains
(
"event_id"
s
)
;
}
std
::
string
SendMessageResponse
::
eventId
()
const
{
if
(
jsonBody
().
get
()
.
contains
(
"event_id"
s
))
{
return
jsonBody
().
get
()[
"event_id"
s
]
.
template
get
<
std
::
string
>
();}
else
{
return
std
::
string
(
);}
}
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Fri, Jul 18, 7:13 AM (14 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
261402
Default Alt Text
room_send.cpp (2 KB)
Attached To
Mode
rL libkazv
Attached
Detach File
Event Timeline
Log In to Comment