IOSAD-61 better [PEPIdentity dictionary] IOSAD-61
authorDirk Zimmermann <dirk@pep-project.org>
Mon, 06 Nov 2017 12:14:53 +0100
branchIOSAD-61
changeset 3474a720e51eea2
parent 346 6e288f887015
child 348 1d887142880f
IOSAD-61 better [PEPIdentity dictionary]
pEpObjCAdapter/PEPIdentity.h
pEpObjCAdapter/PEPIdentity.m
     1.1 --- a/pEpObjCAdapter/PEPIdentity.h	Mon Nov 06 12:08:54 2017 +0100
     1.2 +++ b/pEpObjCAdapter/PEPIdentity.h	Mon Nov 06 12:14:53 2017 +0100
     1.3 @@ -8,6 +8,8 @@
     1.4  
     1.5  #import <Foundation/Foundation.h>
     1.6  
     1.7 +#import "PEPSessionProtocol.h"
     1.8 +
     1.9  @interface PEPIdentity : NSObject <NSMutableCopying>
    1.10  
    1.11  /**
    1.12 @@ -69,6 +71,12 @@
    1.13  - (nonnull instancetype)initWithDictionary:(NSDictionary * _Nonnull)dictionary;
    1.14  
    1.15  /**
    1.16 + This method should be removed once the adapter fully supports objects for identity
    1.17 + and message types insead of dictionaries.
    1.18 + */
    1.19 +- (PEPDict * _Nonnull)dictionary;
    1.20 +
    1.21 +/**
    1.22   Does this identity contain a PGP comm type? This can be used for determining
    1.23   if a communication partner is a pEp user or not.
    1.24   */
     2.1 --- a/pEpObjCAdapter/PEPIdentity.m	Mon Nov 06 12:08:54 2017 +0100
     2.2 +++ b/pEpObjCAdapter/PEPIdentity.m	Mon Nov 06 12:14:53 2017 +0100
     2.3 @@ -69,6 +69,12 @@
     2.4                          language:dictionary[@"lang"]];
     2.5  }
     2.6  
     2.7 +- (PEPDict * _Nonnull)dictionary
     2.8 +{
     2.9 +    // most adapter use should be ok.
    2.10 +    return (PEPDict *) self;
    2.11 +}
    2.12 +
    2.13  - (BOOL)containsPGPCommType
    2.14  {
    2.15      PEP_comm_type val = (PEP_comm_type) self.commType;