pEpObjCAdapter/PEPSession.m
branchIOS-1480
changeset 826 e7261c5157a5
parent 797 ed69de32591f
child 827 d68b4b8f3c2a
     1.1 --- a/pEpObjCAdapter/PEPSession.m	Wed Feb 27 16:08:36 2019 +0100
     1.2 +++ b/pEpObjCAdapter/PEPSession.m	Wed Feb 27 16:08:36 2019 +0100
     1.3 @@ -22,10 +22,10 @@
     1.4  }
     1.5  
     1.6  - (PEPDict * _Nullable)decryptMessageDict:(PEPMutableDict * _Nonnull)messageDict
     1.7 -                                    flags:(PEP_decrypt_flags * _Nullable)flags
     1.8 -                                   rating:(PEP_rating * _Nullable)rating
     1.9 +                                    flags:(PEPDecryptFlags * _Nullable)flags
    1.10 +                                   rating:(PEPRating * _Nullable)rating
    1.11                                  extraKeys:(PEPStringList * _Nullable * _Nullable)extraKeys
    1.12 -                                   status:(PEP_STATUS * _Nullable)status
    1.13 +                                   status:(PEPStatus * _Nullable)status
    1.14                                      error:(NSError * _Nullable * _Nullable)error
    1.15  {
    1.16      PEPInternalSession *session = [PEPSessionProvider session];
    1.17 @@ -39,10 +39,10 @@
    1.18  }
    1.19  
    1.20  - (PEPMessage * _Nullable)decryptMessage:(PEPMessage * _Nonnull)message
    1.21 -                                   flags:(PEP_decrypt_flags * _Nullable)flags
    1.22 -                                  rating:(PEP_rating * _Nullable)rating
    1.23 +                                   flags:(PEPDecryptFlags * _Nullable)flags
    1.24 +                                  rating:(PEPRating * _Nullable)rating
    1.25                                 extraKeys:(PEPStringList * _Nullable * _Nullable)extraKeys
    1.26 -                                  status:(PEP_STATUS * _Nullable)status
    1.27 +                                  status:(PEPStatus * _Nullable)status
    1.28                                     error:(NSError * _Nullable * _Nullable)error
    1.29  {
    1.30      PEPInternalSession *session = [PEPSessionProvider session];
    1.31 @@ -57,8 +57,8 @@
    1.32  
    1.33  - (BOOL)reEvaluateMessageDict:(PEPDict * _Nonnull)messageDict
    1.34                       xKeyList:(PEPStringList * _Nullable)xKeyList
    1.35 -                       rating:(PEP_rating * _Nonnull)rating
    1.36 -                       status:(PEP_STATUS * _Nullable)status
    1.37 +                       rating:(PEPRating * _Nonnull)rating
    1.38 +                       status:(PEPStatus * _Nullable)status
    1.39                          error:(NSError * _Nullable * _Nullable)error
    1.40  {
    1.41      PEPInternalSession *session = [PEPSessionProvider session];
    1.42 @@ -71,8 +71,8 @@
    1.43  
    1.44  - (BOOL)reEvaluateMessage:(PEPMessage * _Nonnull)message
    1.45                   xKeyList:(PEPStringList * _Nullable)xKeyList
    1.46 -                   rating:(PEP_rating * _Nonnull)rating
    1.47 -                   status:(PEP_STATUS * _Nullable)status
    1.48 +                   rating:(PEPRating * _Nonnull)rating
    1.49 +                   status:(PEPStatus * _Nullable)status
    1.50                      error:(NSError * _Nullable * _Nullable)error
    1.51  {
    1.52      PEPInternalSession *session = [PEPSessionProvider session];
    1.53 @@ -85,8 +85,8 @@
    1.54  
    1.55  - (PEPDict * _Nullable)encryptMessageDict:(PEPDict * _Nonnull)messageDict
    1.56                                      extraKeys:(PEPStringList * _Nullable)extraKeys
    1.57 -                                encFormat:(PEP_enc_format)encFormat
    1.58 -                                   status:(PEP_STATUS * _Nullable)status
    1.59 +                                encFormat:(PEPEncFormat)encFormat
    1.60 +                                   status:(PEPStatus * _Nullable)status
    1.61                                      error:(NSError * _Nullable * _Nullable)error
    1.62  {
    1.63      PEPInternalSession *session = [PEPSessionProvider session];
    1.64 @@ -100,8 +100,8 @@
    1.65  
    1.66  - (PEPMessage * _Nullable)encryptMessage:(PEPMessage * _Nonnull)message
    1.67                                 extraKeys:(PEPStringList * _Nullable)extraKeys
    1.68 -                               encFormat:(PEP_enc_format)encFormat
    1.69 -                                  status:(PEP_STATUS * _Nullable)status
    1.70 +                               encFormat:(PEPEncFormat)encFormat
    1.71 +                                  status:(PEPStatus * _Nullable)status
    1.72                                     error:(NSError * _Nullable * _Nullable)error
    1.73  {
    1.74      PEPInternalSession *session = [PEPSessionProvider session];
    1.75 @@ -115,7 +115,7 @@
    1.76  
    1.77  - (PEPMessage * _Nullable)encryptMessage:(PEPMessage * _Nonnull)message
    1.78                                 extraKeys:(PEPStringList * _Nullable)extraKeys
    1.79 -                                  status:(PEP_STATUS * _Nullable)status
    1.80 +                                  status:(PEPStatus * _Nullable)status
    1.81                                     error:(NSError * _Nullable * _Nullable)error
    1.82  {
    1.83      PEPInternalSession *session = [PEPSessionProvider session];
    1.84 @@ -125,7 +125,7 @@
    1.85  - (PEPDict * _Nullable)encryptMessageDict:(PEPDict * _Nonnull)messageDict
    1.86                                    forSelf:(PEPIdentity * _Nonnull)ownIdentity
    1.87                                  extraKeys:(PEPStringList * _Nullable)extraKeys
    1.88 -                                   status:(PEP_STATUS * _Nullable)status
    1.89 +                                   status:(PEPStatus * _Nullable)status
    1.90                                      error:(NSError * _Nullable * _Nullable)error
    1.91  {
    1.92      PEPInternalSession *session = [PEPSessionProvider session];
    1.93 @@ -140,7 +140,7 @@
    1.94  - (PEPMessage * _Nullable)encryptMessage:(PEPMessage * _Nonnull)message
    1.95                                   forSelf:(PEPIdentity * _Nonnull)ownIdentity
    1.96                                 extraKeys:(PEPStringList * _Nullable)extraKeys
    1.97 -                                  status:(PEP_STATUS * _Nullable)status
    1.98 +                                  status:(PEPStatus * _Nullable)status
    1.99                                     error:(NSError * _Nullable * _Nullable)error
   1.100  {
   1.101      PEPInternalSession *session = [PEPSessionProvider session];
   1.102 @@ -154,9 +154,9 @@
   1.103  
   1.104  - (PEPDict * _Nullable)encryptMessageDict:(PEPDict * _Nonnull)messageDict
   1.105                                      toFpr:(NSString * _Nonnull)toFpr
   1.106 -                                encFormat:(PEP_enc_format)encFormat
   1.107 -                                    flags:(PEP_decrypt_flags)flags
   1.108 -                                   status:(PEP_STATUS * _Nullable)status
   1.109 +                                encFormat:(PEPEncFormat)encFormat
   1.110 +                                    flags:(PEPDecryptFlags)flags
   1.111 +                                   status:(PEPStatus * _Nullable)status
   1.112                                      error:(NSError * _Nullable * _Nullable)error __deprecated
   1.113  {
   1.114      PEPInternalSession *session = [PEPSessionProvider session];
   1.115 @@ -171,9 +171,9 @@
   1.116  
   1.117  - (PEPMessage * _Nullable)encryptMessage:(PEPMessage * _Nonnull)message
   1.118                                     toFpr:(NSString * _Nonnull)toFpr
   1.119 -                               encFormat:(PEP_enc_format)encFormat
   1.120 -                                   flags:(PEP_decrypt_flags)flags
   1.121 -                                  status:(PEP_STATUS * _Nullable)status
   1.122 +                               encFormat:(PEPEncFormat)encFormat
   1.123 +                                   flags:(PEPDecryptFlags)flags
   1.124 +                                  status:(PEPStatus * _Nullable)status
   1.125                                     error:(NSError * _Nullable * _Nullable)error
   1.126  {
   1.127      PEPInternalSession *session = [PEPSessionProvider session];
   1.128 @@ -304,13 +304,13 @@
   1.129      return [session languageListWithError:error];
   1.130  }
   1.131  
   1.132 -- (PEP_rating)ratingFromString:(NSString * _Nonnull)string
   1.133 +- (PEPRating)ratingFromString:(NSString * _Nonnull)string
   1.134  {
   1.135      PEPInternalSession *session = [PEPSessionProvider session];
   1.136      return [session ratingFromString:string];
   1.137  }
   1.138  
   1.139 -- (NSString * _Nonnull)stringFromRating:(PEP_rating)rating
   1.140 +- (NSString * _Nonnull)stringFromRating:(PEPRating)rating
   1.141  {
   1.142      PEPInternalSession *session = [PEPSessionProvider session];
   1.143      return [session stringFromRating:rating];
   1.144 @@ -336,7 +336,7 @@
   1.145      return [session configurePassiveModeEnabled:enabled];
   1.146  }
   1.147  
   1.148 -- (BOOL)setFlags:(identity_flags_t)flags
   1.149 +- (BOOL)setFlags:(PEPIdentityFlags)flags
   1.150       forIdentity:(PEPIdentity *)identity
   1.151             error:(NSError * _Nullable * _Nullable)error
   1.152  {
   1.153 @@ -351,7 +351,7 @@
   1.154      return [session trustOwnKeyIdentity:identity error:error];
   1.155  }
   1.156  
   1.157 -- (BOOL)deliverHandshakeResult:(sync_handshake_result)result
   1.158 +- (BOOL)deliverHandshakeResult:(SyncHandshakeResult)result
   1.159                      forPartner:(PEPIdentity * _Nonnull)partner
   1.160                           error:(NSError * _Nullable * _Nullable)error
   1.161  {