IOS-1616 NS_ENUM(int) for all engine-derived enums. IOS-1614
authorDirk Zimmermann <dz@pep.security>
Mon, 27 May 2019 16:59:53 +0200
branchIOS-1614
changeset 973947d4030f34d
parent 972 8e307290dc8f
child 985 07a88ce2aeb0
IOS-1616 NS_ENUM(int) for all engine-derived enums.
pEpObjCAdapterFramework/PEPEngineTypes.h
     1.1 --- a/pEpObjCAdapterFramework/PEPEngineTypes.h	Mon May 27 16:59:53 2019 +0200
     1.2 +++ b/pEpObjCAdapterFramework/PEPEngineTypes.h	Mon May 27 16:59:53 2019 +0200
     1.3 @@ -11,7 +11,7 @@
     1.4  
     1.5  #import <Foundation/Foundation.h>
     1.6  
     1.7 -typedef NS_ENUM(NSUInteger, PEPDecryptFlags) {
     1.8 +typedef NS_ENUM(int, PEPDecryptFlags) {
     1.9      PEPDecryptFlagsNone = 0x1, // This defined only in the adpater, not the engine.
    1.10      PEPDecryptFlagsOwnPrivateKey = 0x1, // PEP_decrypt_flag_own_private_key = 0x1,
    1.11      PEPDecryptFlagsConsume = 0x2, // PEP_decrypt_flag_consume = 0x2,
    1.12 @@ -21,7 +21,7 @@
    1.13      PEPDecryptFlagsUntrustedServer = 0x100 // PEP_decrypt_flag_untrusted_server = 0x100
    1.14  }; // PEP_decrypt_flags;
    1.15  
    1.16 -typedef NS_ENUM(NSUInteger, PEPEncFormat) {
    1.17 +typedef NS_ENUM(int, PEPEncFormat) {
    1.18      PEPEncFormatNone = 0, // PEP_enc_none = 0, // message is not encrypted
    1.19      PEPEncFormatPieces, // PEP_enc_pieces, // inline PGP + PGP extensions
    1.20      PEPEncFormatSMIME, // PEP_enc_S_MIME, // RFC5751
    1.21 @@ -30,7 +30,7 @@
    1.22      PEPEncFormatPgpMIMEOutlook1 // PEP_enc_PGP_MIME_Outlook1 // Message B0rken by Outlook type 1
    1.23  };
    1.24  
    1.25 -typedef NS_ENUM(NSInteger, PEPRating) {
    1.26 +typedef NS_ENUM(int, PEPRating) {
    1.27      PEPRatingUndefined = 0,// PEP_rating_undefined = 0,
    1.28      PEPRatingCannotDecrypt, // PEP_rating_cannot_decrypt,
    1.29      PEPRatingHaveNoKey, // PEP_rating_have_no_key,
    1.30 @@ -47,7 +47,7 @@
    1.31      PEPRatingUnderAttack = -3 // PEP_rating_under_attack = -3
    1.32  };
    1.33  
    1.34 -typedef NS_ENUM(NSInteger, PEPStatus) {
    1.35 +typedef NS_ENUM(int, PEPStatus) {
    1.36      PEPStatusOK                                   = 0, // PEP_STATUS_OK
    1.37  
    1.38      PEPStatusInitCannotLoadGPME                      = 0x0110, // PEP_INIT_CANNOT_LOAD_GPGME
    1.39 @@ -144,7 +144,7 @@
    1.40      PEPStatusVersionMismatch                            = -7, // PEP_VERSION_MISMATCH
    1.41  };
    1.42  
    1.43 -typedef NS_ENUM(NSUInteger, PEPIdentityFlags) {
    1.44 +typedef NS_ENUM(int, PEPIdentityFlags) {
    1.45      // the first octet flags are app defined settings
    1.46      PEPIdentityFlagsNotForSync = 0x0001, // PEP_idf_not_for_sync = 0x0001,   // don't use this identity for sync
    1.47      PEPIdentityFlagsList = 0x0002, // PEP_idf_list = 0x0002,           // identity of list of persons
    1.48 @@ -152,7 +152,7 @@
    1.49      PEPIdentityFlagsDeviceGroup = 0x0100 // PEP_idf_devicegroup = 0x0100     // identity of a device group member
    1.50  };
    1.51  
    1.52 -typedef NS_ENUM(NSInteger, PEPSyncHandshakeSignal) { // _sync_handshake_signal
    1.53 +typedef NS_ENUM(int, PEPSyncHandshakeSignal) { // _sync_handshake_signal
    1.54      PEPSyncHandshakeSignalUndefined = 0, // SYNC_NOTIFY_UNDEFINED = 0,
    1.55  
    1.56      // request show handshake dialog
    1.57 @@ -177,13 +177,13 @@
    1.58      PEPSyncHandshakeSignalInGroup = 255 // SYNC_NOTIFY_IN_GROUP = 255
    1.59  };
    1.60  
    1.61 -typedef NS_ENUM(NSInteger, PEPSyncHandshakeResult) {
    1.62 +typedef NS_ENUM(int, PEPSyncHandshakeResult) {
    1.63      PEPSyncHandshakeResultCancel = -1, // SYNC_HANDSHAKE_CANCEL = -1,
    1.64      PEPSyncHandshakeResultAccepted = 0, // SYNC_HANDSHAKE_ACCEPTED = 0,
    1.65      PEPSyncHandshakeResultRejected = 1 // SYNC_HANDSHAKE_REJECTED = 1
    1.66  };
    1.67  
    1.68 -typedef NS_ENUM(NSUInteger, PEPCommType) {
    1.69 +typedef NS_ENUM(int, PEPCommType) {
    1.70      PEPCommTypeUnknown = 0, // PEP_ct_unknown = 0,
    1.71  
    1.72      // range 0x01 to 0x09: no encryption, 0x0a to 0x0e: nothing reasonable
    1.73 @@ -244,19 +244,19 @@
    1.74      PEPCommTypePEP = 0xff // PEP_ct_pEp = 0xff
    1.75  };
    1.76  
    1.77 -typedef NS_ENUM(NSUInteger, PEPMsgDirection) {
    1.78 +typedef NS_ENUM(int, PEPMsgDirection) {
    1.79      PEPMsgDirectionIncoming = 0,
    1.80      PEPMsgDirectionOutgoing
    1.81  };
    1.82  
    1.83 -typedef NS_ENUM(NSInteger, PEPColor) {
    1.84 +typedef NS_ENUM(int, PEPColor) {
    1.85      PEPColorNoColor = 0,
    1.86      PEPColorYellow,
    1.87      PEPColorGreen,
    1.88      PEPColorRed = -1,
    1.89  };
    1.90  
    1.91 -typedef NS_ENUM(NSInteger, PEPContentDisposition) {
    1.92 +typedef NS_ENUM(int, PEPContentDisposition) {
    1.93      PEPContentDispositionAttachment = 0,
    1.94      PEPContentDispositionInline = 1,
    1.95      PEPContentDispositionOther = -1      // must be affirmatively set