sync/gen_codec.ysl2
branchsync
changeset 2899 63b619aef131
parent 2875 8e3169c2952a
child 3026 c3e63f6aa233
     1.1 --- a/sync/gen_codec.ysl2	Thu Aug 23 22:20:04 2018 +0200
     1.2 +++ b/sync/gen_codec.ysl2	Wed Aug 29 17:10:23 2018 +0200
     1.3 @@ -13,7 +13,7 @@
     1.4      include standardlib.ysl2
     1.5  
     1.6      template "/protocol" {
     1.7 -        document "generated/{@name}_codec.h", "text"
     1.8 +        document "generated/{yml:lcase(@name)}_codec.h", "text"
     1.9          ||
    1.10          // This file is under GNU General Public License 3.0
    1.11          // see LICENSE.txt
    1.12 @@ -22,7 +22,6 @@
    1.13  
    1.14  
    1.15          #include "pEpEngine.h"
    1.16 -        #include "../asn.1/«@name».h"
    1.17  
    1.18  
    1.19          #ifdef __cplusplus
    1.20 @@ -30,6 +29,8 @@
    1.21          #endif
    1.22  
    1.23  
    1.24 +        struct «@name»;
    1.25 +
    1.26          // decode_«@name»_message() - decode PER encoded «@name» message
    1.27          //
    1.28          //  parameters:
    1.29 @@ -43,7 +44,7 @@
    1.30          DYNAMIC_API PEP_STATUS decode_«@name»_message(
    1.31                  const char *data,
    1.32                  size_t size,
    1.33 -                «@name»_t **msg
    1.34 +                struct «@name» **msg
    1.35              );
    1.36  
    1.37  
    1.38 @@ -58,7 +59,7 @@
    1.39          //      data goes to the ownership of the caller
    1.40  
    1.41          DYNAMIC_API PEP_STATUS encode_«@name»_message(
    1.42 -                «@name»_t *msg,
    1.43 +                struct «@name» *msg,
    1.44                  char **data,
    1.45                  size_t *size
    1.46              );
    1.47 @@ -97,12 +98,13 @@
    1.48          #endif
    1.49  
    1.50          ||
    1.51 -        document "generated/{@name}_codec.c", "text"
    1.52 +        document "generated/{yml:lcase(@name)}_codec.c", "text"
    1.53          ||
    1.54          // This file is under GNU General Public License 3.0
    1.55          // see LICENSE.txt
    1.56  
    1.57 -        #include "«@name»_codec.h"
    1.58 +        #include "«yml:lcase(@name)»_codec.h"
    1.59 +        #include "../asn.1/«@name».h"
    1.60          #include "pEp_internal.h"
    1.61          #include "growing_buf.h"
    1.62