Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1037533
client-test-util.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
client-test-util.cpp
View Options
/*
* Copyright (C) 2020 Tusooa Zhu <tusooa@vista.aero>
*
* This file is part of libkazv.
*
* libkazv is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* libkazv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with libkazv. If not, see <https://www.gnu.org/licenses/>.
*/
#include
"client-test-util.hpp"
ClientModel
createTestClientModel
()
{
ClientModel
m
;
m
.
serverUrl
=
"example.com"
;
m
.
userId
=
"@bob:example.com"
;
m
.
token
=
"exampletoken"
;
m
.
deviceId
=
"exampledevice"
;
m
.
loggedIn
=
true
;
return
m
;
}
Response
createResponse
(
std
::
string
jobId
,
JsonWrap
j
,
JsonWrap
data
)
{
Response
r
;
r
.
statusCode
=
200
;
r
.
body
=
j
;
json
origData
=
data
.
get
();
origData
[
"-job-id"
]
=
jobId
;
r
.
extraData
=
origData
;
return
r
;
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Wed, May 14, 7:26 AM (1 d, 15 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
132373
Default Alt Text
client-test-util.cpp (1 KB)
Attached To
Mode
rL libkazv
Attached
Detach File
Event Timeline
Log In to Comment