pEpObjCAdapter/NSDictionary+CommType.m
author Dirk Zimmermann <dz@pep.security>
Fri, 20 Sep 2019 10:01:48 +0200
branchIOSAD-141
changeset 1250 b6a4d30abd26
parent 989 ea535c5971b9
child 1086 52ff9d05f7d9
permissions -rw-r--r--
IOSAD-141 Test for "hammering" the engine.
dirk@215
     1
//
dz@865
     2
//  NSDictionary+CommType.m
dirk@215
     3
//  pEpObjCAdapter
dirk@215
     4
//
dirk@215
     5
//  Created by Dirk Zimmermann on 04.09.17.
dirk@215
     6
//  Copyright © 2017 p≡p. All rights reserved.
dirk@215
     7
//
dirk@215
     8
dirk@215
     9
#import <Foundation/Foundation.h>
dirk@215
    10
dz@865
    11
#import "NSDictionary+CommType.h"
dirk@215
    12
dz@902
    13
#import "PEPConstants.h"
dz@851
    14
dirk@367
    15
#import "PEPMessageUtil.h"
dirk@225
    16
dz@865
    17
@implementation NSDictionary (CommType)
dirk@215
    18
dz@988
    19
- (PEPCommType)commType
dirk@227
    20
{
dirk@227
    21
    NSNumber *ctNum = self[kPepCommType];
dirk@227
    22
    if (!ctNum) {
dz@989
    23
        return PEPCommTypeUnknown;
dirk@227
    24
    }
dirk@227
    25
    return ctNum.intValue;
dirk@227
    26
}
dirk@227
    27
dirk@215
    28
@end