IOSAD-99 outgoingRatingPreviewForMessage
authorDirk Zimmermann <dirk@pep-project.org>
Mon, 10 Sep 2018 12:06:49 +0200
changeset 65254fb566f9d45
parent 651 6cf8ea7465b0
child 653 96e86c16a23b
IOSAD-99 outgoingRatingPreviewForMessage
pEpObjCAdapter/PEPInternalSession.m
pEpObjCAdapter/PEPSession.m
pEpObjCAdapter/PEPSessionProtocol.h
     1.1 --- a/pEpObjCAdapter/PEPInternalSession.m	Mon Sep 10 12:06:49 2018 +0200
     1.2 +++ b/pEpObjCAdapter/PEPInternalSession.m	Mon Sep 10 12:06:49 2018 +0200
     1.3 @@ -503,6 +503,15 @@
     1.4              error:error];
     1.5  }
     1.6  
     1.7 +- (NSNumber * _Nullable)outgoingRatingPreviewForMessage:(PEPMessage * _Nonnull)theMessage
     1.8 +                                                  error:(NSError * _Nullable * _Nullable)error
     1.9 +{
    1.10 +    return [self
    1.11 +            helperOutgoingRatingForMessage:theMessage
    1.12 +            ratingFunction:&outgoing_message_rating_preview
    1.13 +            error:error];
    1.14 +}
    1.15 +
    1.16  - (NSNumber * _Nullable)ratingForIdentity:(PEPIdentity * _Nonnull)identity
    1.17                                      error:(NSError * _Nullable * _Nullable)error
    1.18  {
     2.1 --- a/pEpObjCAdapter/PEPSession.m	Mon Sep 10 12:06:49 2018 +0200
     2.2 +++ b/pEpObjCAdapter/PEPSession.m	Mon Sep 10 12:06:49 2018 +0200
     2.3 @@ -193,6 +193,13 @@
     2.4      return [session outgoingRatingForMessage:theMessage error:error];
     2.5  }
     2.6  
     2.7 +- (NSNumber * _Nullable)outgoingRatingPreviewForMessage:(PEPMessage * _Nonnull)theMessage
     2.8 +                                                  error:(NSError * _Nullable * _Nullable)error
     2.9 +{
    2.10 +    PEPInternalSession *session = [PEPSessionProvider session];
    2.11 +    return [session outgoingRatingPreviewForMessage:theMessage error:error];
    2.12 +}
    2.13 +
    2.14  - (NSNumber * _Nullable)ratingForIdentity:(PEPIdentity * _Nonnull)identity
    2.15                                      error:(NSError * _Nullable * _Nullable)error
    2.16  {
     3.1 --- a/pEpObjCAdapter/PEPSessionProtocol.h	Mon Sep 10 12:06:49 2018 +0200
     3.2 +++ b/pEpObjCAdapter/PEPSessionProtocol.h	Mon Sep 10 12:06:49 2018 +0200
     3.3 @@ -110,6 +110,10 @@
     3.4  - (NSNumber * _Nullable)outgoingRatingForMessage:(PEPMessage * _Nonnull)theMessage
     3.5                                             error:(NSError * _Nullable * _Nullable)error;
     3.6  
     3.7 +/** Determine the preview status color of a message to be sent */
     3.8 +- (NSNumber * _Nullable)outgoingRatingPreviewForMessage:(PEPMessage * _Nonnull)theMessage
     3.9 +                                                  error:(NSError * _Nullable * _Nullable)error;
    3.10 +
    3.11  /**
    3.12   Determine the rating of an identity.
    3.13   The rating is the rating a _message_ would have, if it is sent to this (and only this) identity.