src/map_asn1.h
author Edouard Tisserant <edouard@pep-project.org>
Tue, 02 Aug 2016 14:51:03 +0200
branchkeysync
changeset 969 bf2aac3565a3
parent 940 5f0a9d0f0ecd
child 1248 c332c47fe26e
permissions -rw-r--r--
typo ?
     1 #pragma once
     2 
     3 #include "pEpEngine.h"
     4 #include "identity_list.h"
     5 #include "../asn.1/Identity.h"
     6 #include "../asn.1/IdentityList.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 // IdentityList_from_identity_list() - convert identity_list_t into ASN.1 IdentityList_t
    47 //
    48 //  params:
    49 //      list (in)           identity_list to convert
    50 //      result (inout)      IdentityList_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 IdentityList_t *IdentityList_from_identity_list(
    59         const identity_list *list,
    60         IdentityList_t *result
    61     );
    62 
    63 // IdentityList_to_identity_list() - convert ASN.1 IdentityList_t to identity_list_t
    64 //
    65 //  params:
    66 //      list (in)           ASN.1 IdentityList_t to convert
    67 //      result (inout)      identity_list_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 identity_list *IdentityList_to_identity_list(IdentityList_t *list, identity_list *result);
    76 
    77 
    78 #ifdef __cplusplus
    79 }
    80 #endif
    81