src/map_asn1.h
author Lars Rohwedder <roker@pep-project.org>
Tue, 07 Jun 2016 23:29:46 +0200
changeset 723 be101850681e
parent 672 f7bcbc1db9bf
child 940 5f0a9d0f0ecd
permissions -rw-r--r--
compiler shows with -Wall some warnings about unused code etc.
     1 #pragma once
     2 
     3 #include "pEpEngine.h"
     4 #include "stringlist.h"
     5 #include "../asn.1/Identity.h"
     6 #include "../asn.1/KeyList.h"
     7 
     8 #ifdef __cplusplus
     9 extern "C" {
    10 #endif
    11 
    12 
    13 // Identity_from_Struct() - convert pEp_identity into ASN.1 Identity_t
    14 //
    15 //  params:
    16 //      ident (in)          pEp_identity to convert
    17 //      result (inout)      Identity_t to update or NULL to alloc a new one
    18 //
    19 //  return value:
    20 //      pointer to updated or allocated result
    21 //
    22 //  caveat:
    23 //      if a new struct is allocated, the ownership goes to the caller
    24 
    25 Identity_t *Identity_from_Struct(
    26         const pEp_identity *ident,
    27         Identity_t *result
    28     );
    29 
    30 
    31 // Identity_to_Struct() - convert ASN.1 Identity_t into pEp_identity
    32 //
    33 //  params:
    34 //      ident (in)          Identity_t to convert
    35 //      result (inout)      pEp_identity to update or NULL to alloc a new one
    36 //
    37 //  return value:
    38 //      pointer to updated or allocated result
    39 //
    40 //  caveat:
    41 //      if a new struct is allocated, the ownership goes to the caller
    42 
    43 pEp_identity *Identity_to_Struct(Identity_t *ident, pEp_identity *result);
    44 
    45 
    46 // KeyList_from_stringlist() - convert stringlist_t into ASN.1 KeyList_t
    47 //
    48 //  params:
    49 //      list (in)           stringlist_t to convert
    50 //      result (inout)      KeyList_t to update or NULL to alloc a new one
    51 //
    52 //  return value:
    53 //      pointer to updated or allocated result
    54 //
    55 //  caveat:
    56 //      if a new struct is allocated, the ownership goes to the caller
    57 
    58 KeyList_t *KeyList_from_stringlist(
    59         const stringlist_t *list,
    60         KeyList_t *result
    61     );
    62 
    63 // KeyList_to_stringlist() - convert ASN.1 KeyList_t to stringlist_t
    64 //
    65 //  params:
    66 //      list (in)           ASN.1 KeyList_t to convert
    67 //      result (inout)      stringlist_t to update or NULL to alloc a new one
    68 //
    69 //  return value:
    70 //      pointer to updated or allocated result
    71 //
    72 //  caveat:
    73 //      if a new struct is allocated, the ownership goes to the caller
    74 
    75 stringlist_t *KeyList_to_stringlist(KeyList_t *list, stringlist_t *result);
    76 
    77 
    78 #ifdef __cplusplus
    79 }
    80 #endif
    81