IOAD-51 reEvaluateMessage: rating is in/out
authorDirk Zimmermann <dirk@pep-project.org>
Tue, 19 Jun 2018 18:53:51 +0200
changeset 633e9078acc8b2a
parent 632 463397b4646f
child 634 9d89bc605c1f
IOAD-51 reEvaluateMessage: rating is in/out
pEpObjCAdapter/PEPInternalSession.m
pEpObjCAdapter/PEPSession.m
pEpObjCAdapter/PEPSessionProtocol.h
     1.1 --- a/pEpObjCAdapter/PEPInternalSession.m	Mon Jun 18 11:37:20 2018 +0200
     1.2 +++ b/pEpObjCAdapter/PEPInternalSession.m	Tue Jun 19 18:53:51 2018 +0200
     1.3 @@ -205,19 +205,18 @@
     1.4  }
     1.5  
     1.6  - (BOOL)reEvaluateMessageDict:(PEPDict * _Nonnull)messageDict
     1.7 -                       rating:(PEP_rating * _Nullable)rating
     1.8 +                       rating:(PEP_rating * _Nonnull)rating
     1.9                         status:(PEP_STATUS * _Nullable)status
    1.10                          error:(NSError * _Nullable * _Nullable)error
    1.11  {
    1.12      message *_src = PEP_messageDictToStruct(messageDict);
    1.13 -    PEP_rating ratingByEngine = PEP_rating_undefined;
    1.14  
    1.15      [self lockWrite];
    1.16      PEP_STATUS theStatus = re_evaluate_message_rating(_session,
    1.17                                                        _src,
    1.18                                                        NULL,
    1.19 -                                                      PEP_rating_undefined,
    1.20 -                                                      &ratingByEngine);
    1.21 +                                                      *rating,
    1.22 +                                                      rating);
    1.23      [self unlockWrite];
    1.24  
    1.25      free_message(_src);
    1.26 @@ -229,15 +228,12 @@
    1.27      if ([NSError setError:error fromPEPStatus:theStatus]) {
    1.28          return NO;
    1.29      } else {
    1.30 -        if (rating) {
    1.31 -            *rating = ratingByEngine;
    1.32 -        }
    1.33          return YES;
    1.34      }
    1.35  }
    1.36  
    1.37  - (BOOL)reEvaluateMessage:(PEPMessage * _Nonnull)message
    1.38 -                   rating:(PEP_rating * _Nullable)rating
    1.39 +                   rating:(PEP_rating * _Nonnull)rating
    1.40                     status:(PEP_STATUS * _Nullable)status
    1.41                      error:(NSError * _Nullable * _Nullable)error
    1.42  {
     2.1 --- a/pEpObjCAdapter/PEPSession.m	Mon Jun 18 11:37:20 2018 +0200
     2.2 +++ b/pEpObjCAdapter/PEPSession.m	Tue Jun 19 18:53:51 2018 +0200
     2.3 @@ -56,7 +56,7 @@
     2.4  }
     2.5  
     2.6  - (BOOL)reEvaluateMessageDict:(PEPDict * _Nonnull)messageDict
     2.7 -                       rating:(PEP_rating * _Nullable)rating
     2.8 +                       rating:(PEP_rating * _Nonnull)rating
     2.9                         status:(PEP_STATUS * _Nullable)status
    2.10                          error:(NSError * _Nullable * _Nullable)error
    2.11  {
    2.12 @@ -65,7 +65,7 @@
    2.13  }
    2.14  
    2.15  - (BOOL)reEvaluateMessage:(PEPMessage * _Nonnull)message
    2.16 -                   rating:(PEP_rating * _Nullable)rating
    2.17 +                   rating:(PEP_rating * _Nonnull)rating
    2.18                     status:(PEP_STATUS * _Nullable)status
    2.19                      error:(NSError * _Nullable * _Nullable)error
    2.20  {
     3.1 --- a/pEpObjCAdapter/PEPSessionProtocol.h	Mon Jun 18 11:37:20 2018 +0200
     3.2 +++ b/pEpObjCAdapter/PEPSessionProtocol.h	Tue Jun 19 18:53:51 2018 +0200
     3.3 @@ -38,13 +38,13 @@
     3.4  
     3.5  /** Re-evaluate rating of decrypted message */
     3.6  - (BOOL)reEvaluateMessageDict:(PEPDict * _Nonnull)messageDict
     3.7 -                       rating:(PEP_rating * _Nullable)rating
     3.8 +                       rating:(PEP_rating * _Nonnull)rating
     3.9                         status:(PEP_STATUS * _Nullable)status
    3.10                          error:(NSError * _Nullable * _Nullable)error __deprecated;
    3.11  
    3.12  /** Re-evaluate rating of decrypted message */
    3.13  - (BOOL)reEvaluateMessage:(PEPMessage * _Nonnull)message
    3.14 -                   rating:(PEP_rating * _Nullable)rating
    3.15 +                   rating:(PEP_rating * _Nonnull)rating
    3.16                     status:(PEP_STATUS * _Nullable)status
    3.17                      error:(NSError * _Nullable * _Nullable)error;
    3.18