From 97866e6f23d494229b19d7557322ba3af198ce24 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Fri, 31 Aug 2018 01:57:51 +0200 Subject: [PATCH] Set compression framing enum value by appearance 0 = none (oldest) 1 = comp-lzo 2 = compress (newest) --- TunnelKit/Sources/Core/CompressionFraming.swift | 6 +++--- TunnelKit/Sources/Core/CompressionFramingNative.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/TunnelKit/Sources/Core/CompressionFraming.swift b/TunnelKit/Sources/Core/CompressionFraming.swift index 4fbb583..33ed011 100644 --- a/TunnelKit/Sources/Core/CompressionFraming.swift +++ b/TunnelKit/Sources/Core/CompressionFraming.swift @@ -34,13 +34,13 @@ extension SessionProxy { /// No compression framing. case disabled - /// Framing compatible with 2.4 `compress`. - case compress - /// Framing compatible with `comp-lzo` (deprecated). @available(*, deprecated) case compLZO + /// Framing compatible with 2.4 `compress`. + case compress + var native: CompressionFramingNative { guard let val = CompressionFramingNative(rawValue: rawValue) else { fatalError("Unhandled CompressionFraming bridging") diff --git a/TunnelKit/Sources/Core/CompressionFramingNative.h b/TunnelKit/Sources/Core/CompressionFramingNative.h index 1792e6d..691d79a 100644 --- a/TunnelKit/Sources/Core/CompressionFramingNative.h +++ b/TunnelKit/Sources/Core/CompressionFramingNative.h @@ -27,6 +27,6 @@ typedef NS_ENUM(NSInteger, CompressionFramingNative) { CompressionFramingNativeDisabled, - CompressionFramingNativeCompress, - CompressionFramingNativeCompLZO __attribute__((deprecated)) + CompressionFramingNativeCompLZO __attribute__((deprecated)), + CompressionFramingNativeCompress };