pEpObjCAdapter/NSNumber+PEPRating.m
author Dirk Zimmermann <dz@pep.security>
Fri, 20 Sep 2019 10:01:48 +0200
branchIOSAD-141
changeset 1250 b6a4d30abd26
parent 854 90b58075e2a1
permissions -rw-r--r--
IOSAD-141 Test for "hammering" the engine.
     1 //
     2 //  NSNumber+PEPRating.m
     3 //  pEpObjCAdapter
     4 //
     5 //  Created by Dirk Zimmermann on 13.04.18.
     6 //  Copyright © 2018 p≡p. All rights reserved.
     7 //
     8 
     9 #import "NSNumber+PEPRating.h"
    10 
    11 #import "message_api.h"
    12 
    13 @implementation NSNumber (Extension)
    14 
    15 - initWithPEPRating:(PEPRating)pEpRating
    16 {
    17     return [self initWithInt:pEpRating];
    18 }
    19 
    20 - initWithPEPRatingInternal:(PEP_rating)pEpRating
    21 {
    22     return [self initWithInt:pEpRating];
    23 }
    24 
    25 - (PEPRating)pEpRating
    26 {
    27     return self.intValue;
    28 }
    29 
    30 - (PEP_rating)pEpRatingInternal
    31 {
    32     return self.intValue;
    33 }
    34 
    35 + (NSNumber *)numberWithPEPRating:(PEPRating)pEpRating
    36 {
    37     return [[NSNumber alloc] initWithPEPRating:pEpRating];
    38 }
    39 
    40 + (NSNumber *)numberWithPEPRatingInternal:(PEP_rating)pEpRating
    41 {
    42     return [[NSNumber alloc] initWithPEPRatingInternal:pEpRating];
    43 }
    44 
    45 @end