ENGINE-365: is_pep_user() is now exposed to the outside. See pep_engine.h documentation
authorKrista Bennett <krista@pep-project.org>
Fri, 09 Feb 2018 08:14:27 +0100
changeset 2490a527d621b486
parent 2489 1f29e7c1fb8a
child 2491 4852c6c94029
ENGINE-365: is_pep_user() is now exposed to the outside. See pep_engine.h documentation
src/pEpEngine.c
src/pEpEngine.h
     1.1 --- a/src/pEpEngine.c	Thu Feb 08 20:05:10 2018 +0100
     1.2 +++ b/src/pEpEngine.c	Fri Feb 09 08:14:27 2018 +0100
     1.3 @@ -2460,7 +2460,7 @@
     1.4      return status;
     1.5  }
     1.6  
     1.7 -PEP_STATUS is_pep_user(PEP_SESSION session, pEp_identity *identity, bool* is_pep)
     1.8 +DYNAMIC_API PEP_STATUS is_pep_user(PEP_SESSION session, pEp_identity *identity, bool* is_pep)
     1.9  {
    1.10      assert(session);
    1.11      assert(is_pep);
     2.1 --- a/src/pEpEngine.h	Thu Feb 08 20:05:10 2018 +0100
     2.2 +++ b/src/pEpEngine.h	Fri Feb 09 08:14:27 2018 +0100
     2.3 @@ -1192,6 +1192,27 @@
     2.4  //
     2.5  DYNAMIC_API const char* get_engine_version();
     2.6  
     2.7 +// is_pep_user() - returns true if the USER corresponding to this identity 
     2.8 +//                 has been listed in the *person* table as a pEp user. 
     2.9 +//
    2.10 +//  parameters:
    2.11 +//      identity (in) - identity containing the user_id to check (this is
    2.12 +//                      the only part of the struct we require to be set)
    2.13 +//      is_pep (out)  - boolean pointer - will return true or false by
    2.14 +//                      reference with respect to whether or not user is
    2.15 +//                      a known pep user
    2.16 +//
    2.17 +//  return_value: PEP_STATUS_OK if user found in person table
    2.18 +//                PEP_ILLEGAL_VALUE if no user_id in input
    2.19 +//                PEP_CANNOT_FIND_PERSON if user_id doesn't exist
    2.20 +//
    2.21 +//  caveat: This *does not check comm_type*
    2.22 +//                         
    2.23 +DYNAMIC_API PEP_STATUS is_pep_user(PEP_SESSION session, 
    2.24 +                                   pEp_identity *identity, 
    2.25 +                                   bool* is_pep);
    2.26 +
    2.27 +
    2.28  
    2.29  DYNAMIC_API PEP_STATUS reset_peptest_hack(PEP_SESSION session);
    2.30  
    2.31 @@ -1236,10 +1257,6 @@
    2.32  // Also replaces aliased user_ids by defaults in identity.
    2.33  PEP_STATUS exists_person(PEP_SESSION session, pEp_identity* identity, bool* exists);
    2.34  
    2.35 -// returns true if the USER corresponding to this identity has been listed in
    2.36 -// the *person* table as a pEp user. This *does not check comm_type*                         
    2.37 -PEP_STATUS is_pep_user(PEP_SESSION session, pEp_identity *identity, bool* is_pep);
    2.38 -
    2.39  PEP_STATUS set_pgp_keypair(PEP_SESSION session, const char* fpr);
    2.40  
    2.41  #ifdef __cplusplus