This website works better with JavaScript.
Home
Help
Register
Sign In
pEp.foundation
/
pEpJSONServerAdapter
Watch
8
Star
0
Fork
3
Code
Issues
Pull Requests
1
Releases
35
Wiki
Activity
Browse Source
according to Krista, neither the bool parameter of mime_encode_message() nor the bool* of mime_decode_message are part of the API for the cloents. So I don't expose them to the JSON-RPC clients.
postrelease
Roker
2 years ago
parent
eb663f7aa2
commit
79e3a052a1
2 changed files
with
32 additions
and
2 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-2
server/ev_server.cc
+30
-0
server/inout.hh
+ 2
- 2
server/ev_server.cc
View File
@ -91,8 +91,8 @@ const FunctionMap functions = {
// from mime.h
FP
(
"
MIME handling API
"
,
new
Separator
)
,
FP
(
"
mime_encode_message
"
,
new
Func
<
PEP_STATUS
,
In
<
const
message
*
>
,
In
<
bool
>
,
Out
<
char
*
>
,
In
<
bool
>
>
(
&
mime_encode_message
)
)
,
FP
(
"
mime_decode_message
"
,
new
Func
<
PEP_STATUS
,
In
<
c_string
>
,
InLength
<
>
,
Out
<
message
*
>
,
Out
<
bool
>
>
(
&
mime_decode_message
)
)
,
FP
(
"
mime_encode_message
"
,
new
Func
<
PEP_STATUS
,
In
<
const
message
*
>
,
In
<
bool
>
,
Out
<
char
*
>
,
In
<
bool
,
ParamFlag
:
:
NoInput
>
>
(
&
mime_encode_message
)
)
,
FP
(
"
mime_decode_message
"
,
new
Func
<
PEP_STATUS
,
In
<
c_string
>
,
InLength
<
>
,
Out
<
message
*
>
,
In
<
bool
*
,
ParamFlag
:
:
NoInput
>
>
(
&
mime_decode_message
)
)
,
// from pEpEngine.h
FP
(
"
pEp Engine Core API
"
,
new
Separator
)
,
+ 30
- 0
server/inout.hh
View File
@ -82,6 +82,36 @@ struct In
}
;
template
<
class
T
>
struct
In
<
T
,
ParamFlag
:
:
NoInput
>
{
typedef
T
c_type
;
// the according type in C function parameter
enum
{
is_output
=
false
,
need_input
=
false
}
;
typedef
In
<
T
,
ParamFlag
:
:
NoInput
>
Self
;
explicit
In
(
const
T
&
t
)
:
value
(
T
{
}
)
{
}
~
In
(
)
{
}
In
(
const
Self
&
other
)
=
delete
;
In
(
Self
&
&
victim
)
=
delete
;
Self
&
operator
=
(
const
Self
&
)
=
delete
;
// default implementation:
In
(
const
js
:
:
Value
&
v
,
Context
*
,
unsigned
param_nr
)
:
value
{
T
{
}
}
{
}
js
:
:
Value
to_json
(
)
const
{
throw
std
:
:
logic_error
(
std
:
:
string
(
"
Never call to_json() for a In<
"
)
+
typeid
(
T
)
.
name
(
)
+
"
> data type! fn=
"
+
__PRETTY_FUNCTION__
)
;
}
T
get_value
(
)
const
{
return
value
;
}
T
value
;
}
;
// to call functions that operate directly on the JSON data type
template
<
class
T
,
ParamFlag
PF
=
ParamFlag
:
:
Default
>
struct
InRaw
Write
Preview
Loading…
Cancel
Save