forked from pEp.foundation/libpEpTransport
generate C#
parent
6b67f61147
commit
ab3442596a
@ -0,0 +1,37 @@
|
||||
include yslt.yml2
|
||||
|
||||
tstylesheet {
|
||||
include standardlib.ysl2
|
||||
|
||||
template "/enum"
|
||||
||
|
||||
namespace pEp {
|
||||
enum «yml:CamelCase(@name)»
|
||||
{
|
||||
`` apply "item|doc", 2
|
||||
}
|
||||
}
|
||||
||
|
||||
|
||||
template "item" {
|
||||
param "hexdigits", 8;
|
||||
indent 0;
|
||||
choose {
|
||||
when "@output='hex'"
|
||||
> «yml:CamelCase(@name)» = 0x«yml:dec2hex(.,$hexdigits)»
|
||||
otherwise
|
||||
> «yml:CamelCase(@name)» = «.»
|
||||
}
|
||||
if "position()!=last()" > ,
|
||||
if "@doc" > // «@doc»
|
||||
> \n
|
||||
}
|
||||
|
||||
template "doc"
|
||||
||
|
||||
|
||||
// «.»
|
||||
|
||||
||
|
||||
}
|
||||
|
@ -1,5 +1,9 @@
|
||||
doc > transport status codes for RCE (0x02)
|
||||
|
||||
hex rce_cannot_create_user 0x02800001;
|
||||
hex rce_cannot_login_user 0x02800002;
|
||||
hex rce_cannot_find_user 0x02800003;
|
||||
|
||||
hex torrent_has_no_seeders 0x02ff0001;
|
||||
hex unknown_torrent_error 0x02ffffff;
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
doc > transport status codes for p≡p over SCTP (0x04)
|
||||
doc > transport status codes for pEp over SCTP (0x04)
|
||||
|
||||
hex unkown_sctp_error 0x04ffffff;
|
||||
|
Loading…
Reference in New Issue