Skip to content

Commit d79187b

Browse files
Remove usage of SWIFT_ENUM
1 parent 20fe9bd commit d79187b

File tree

5 files changed

+23
-7
lines changed

5 files changed

+23
-7
lines changed

ChatSecure.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,7 @@
494494
D9AE3A321BA8D9AB00255537 /* OTRConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 633105EE1A16D1A300C17BAE /* OTRConstants.h */; settings = {ATTRIBUTES = (Public, ); }; };
495495
D9AE3A331BA8D9AB00255537 /* OTRConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 633105EF1A16D1A300C17BAE /* OTRConstants.m */; };
496496
D9B3EC221FA196CE00E63C7F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9B3EC211FA196CE00E63C7F /* AppDelegate.swift */; };
497+
D9B3F9E720C6500F005000A9 /* RoomOccupantRole.h in Headers */ = {isa = PBXBuildFile; fileRef = D9B3F9E620C6500F005000A9 /* RoomOccupantRole.h */; settings = {ATTRIBUTES = (Public, ); }; };
497498
D9B79B951ECF951F00883963 /* OTRFileItem.h in Headers */ = {isa = PBXBuildFile; fileRef = D9B79B931ECF951F00883963 /* OTRFileItem.h */; };
498499
D9B79B961ECF951F00883963 /* OTRFileItem.m in Sources */ = {isa = PBXBuildFile; fileRef = D9B79B941ECF951F00883963 /* OTRFileItem.m */; };
499500
D9B7C5CE1EC3C9ED008D99E6 /* OTRAccountMigrator.m in Sources */ = {isa = PBXBuildFile; fileRef = D93718521EC267F800766D49 /* OTRAccountMigrator.m */; };
@@ -1134,6 +1135,7 @@
11341135
D9AE3A2E1BA8D84500255537 /* OTRBranding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OTRBranding.h; sourceTree = "<group>"; };
11351136
D9AE3A2F1BA8D84500255537 /* OTRBranding.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OTRBranding.m; sourceTree = "<group>"; };
11361137
D9B3EC211FA196CE00E63C7F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
1138+
D9B3F9E620C6500F005000A9 /* RoomOccupantRole.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomOccupantRole.h; sourceTree = "<group>"; };
11371139
D9B79B931ECF951F00883963 /* OTRFileItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OTRFileItem.h; sourceTree = "<group>"; };
11381140
D9B79B941ECF951F00883963 /* OTRFileItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OTRFileItem.m; sourceTree = "<group>"; };
11391141
D9B9B1311DC7F3AC0007F5A7 /* UserInfoProfileCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserInfoProfileCell.swift; sourceTree = "<group>"; };
@@ -1507,6 +1509,7 @@
15071509
633105B81A16D1A300C17BAE /* Yap Storage */ = {
15081510
isa = PBXGroup;
15091511
children = (
1512+
D9B3F9E620C6500F005000A9 /* RoomOccupantRole.h */,
15101513
D947C2FA1FB251410037DE84 /* SecondaryIndexes.swift */,
15111514
D9A1E6541F7309C100E42118 /* OTRDownloadMessage.swift */,
15121515
D91F9EF91ED6301500AEA62C /* OTRDownloadMessage.h */,
@@ -2221,6 +2224,7 @@
22212224
D9B79B951ECF951F00883963 /* OTRFileItem.h in Headers */,
22222225
637ABBC91DD5312200B18DD2 /* OTROutgoingMessage.h in Headers */,
22232226
D93DDB8C1BA79A8E00CD8331 /* OTRVideoItem.h in Headers */,
2227+
D9B3F9E720C6500F005000A9 /* RoomOccupantRole.h in Headers */,
22242228
D93DDB821BA79A8700CD8331 /* OTRValueSetting.h in Headers */,
22252229
D93DDB9E1BA79AA000CD8331 /* OTRUtilities.h in Headers */,
22262230
D93DDBDE1BA79AF900CD8331 /* OTRTouchAndHoldGestureRecognizer.h in Headers */,

ChatSecure/Classes/Model/OTRBuddyCache.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
NS_ASSUME_NONNULL_BEGIN
1313

1414
@class OTRXMPPRoom;
15-
typedef SWIFT_ENUM(NSInteger, RoomOccupantRole);
1615
@class OTRXMPPRoomOccupant;
1716

1817
@interface OTRXMPPRoomRuntimeProperties : NSObject

ChatSecure/Classes/Model/Yap Storage/OTRXMPPRoomOccupant.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,7 @@ import YapDatabase
1111
import Mantle
1212
import CocoaLumberjack
1313

14-
@objc public enum RoomOccupantRole:Int {
15-
case none = 0
16-
case participant = 1
17-
case moderator = 2
18-
case visitor = 3
19-
14+
extension RoomOccupantRole {
2015
public init(stringValue: String) {
2116
self = RoomOccupantRoleHelper.role(withString: stringValue)
2217
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//
2+
// RoomOccupantRole.h
3+
// ChatSecureCore
4+
//
5+
// Created by Chris Ballinger on 6/4/18.
6+
// Copyright © 2018 Chris Ballinger. All rights reserved.
7+
//
8+
9+
@import Foundation;
10+
11+
typedef NS_ENUM(NSInteger, RoomOccupantRole) {
12+
RoomOccupantRoleNone = 0,
13+
RoomOccupantRoleParticipant = 1,
14+
RoomOccupantRoleModerator = 2,
15+
RoomOccupantRoleVisitor = 3
16+
};

ChatSecureCore/ChatSecureCore.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ FOUNDATION_EXPORT const unsigned char ChatSecureCoreVersionString[];
8787
#import "OTRXMPPRoomManager.h"
8888
#import "OTRQRCodeReaderDelegate.h"
8989
#import "OTRBuddyApprovalCell.h"
90+
#import "RoomOccupantRole.h"
91+
9092

9193
#import "OTRImageItem.h"
9294
#import "OTRAudioItem.h"

0 commit comments

Comments
 (0)