export rating_from_comm_type() sync
authorVolker Birk <vb@pep-project.org>
Fri, 18 Oct 2019 14:49:54 +0200
branchsync
changeset 4126d6a2fa2086a0
parent 4124 1ebe4c90edf3
child 4127 2fb3ecbf7c42
child 4128 4501cadac721
export rating_from_comm_type()
src/message_api.c
src/message_api.h
     1.1 --- a/src/message_api.c	Thu Oct 17 15:30:16 2019 +0200
     1.2 +++ b/src/message_api.c	Fri Oct 18 14:49:54 2019 +0200
     1.3 @@ -1100,7 +1100,7 @@
     1.4  }
     1.5  */
     1.6  
     1.7 -static PEP_rating _rating(PEP_comm_type ct)
     1.8 +static inline PEP_rating _rating(PEP_comm_type ct)
     1.9  {
    1.10      if (ct == PEP_ct_unknown)
    1.11          return PEP_rating_undefined;
    1.12 @@ -1131,6 +1131,11 @@
    1.13          return PEP_rating_unreliable;
    1.14  }
    1.15  
    1.16 +DYNAMIC_API PEP_rating rating_from_comm_type(PEP_comm_type ct)
    1.17 +{
    1.18 +    return _rating(ct);
    1.19 +}
    1.20 +
    1.21  static bool is_encrypted_attachment(const bloblist_t *blob)
    1.22  {
    1.23      assert(blob);
     2.1 --- a/src/message_api.h	Thu Oct 17 15:30:16 2019 +0200
     2.2 +++ b/src/message_api.h	Fri Oct 18 14:49:54 2019 +0200
     2.3 @@ -512,6 +512,18 @@
     2.4          PEP_rating *rating
     2.5      );
     2.6  
     2.7 +// rating_from_comm_type()  - get the rating for a comm type
     2.8 +//
     2.9 +//  parameters:
    2.10 +//
    2.11 +//      ct (in)                 the comm type to deliver the rating for
    2.12 +//
    2.13 +//  returns:
    2.14 +//      rating value for comm type ct
    2.15 +
    2.16 +DYNAMIC_API PEP_rating rating_from_comm_type(PEP_comm_type ct);
    2.17 +
    2.18 +
    2.19  #ifdef __cplusplus
    2.20  }
    2.21  #endif