Browse Source

Merge branch 'master' into IPS-9

IPS-9
Dirk Zimmermann 3 weeks ago
parent
commit
dfe6e86a3b
75 changed files with 1603 additions and 1606 deletions
  1. +14
    -1
      .gitignore
  2. +36
    -8
      README.md
  3. +0
    -2
      Subprojects/PEPObjCAdapterProtocols/PEPObjCAdapterProtocols/PEPSessionProtocol.m
  4. +0
    -3
      Subprojects/PEPObjCAdapterProtocols/PEPObjCAdapterProtocols/PublicHeaders/PEPSessionProtocol.h
  5. +44
    -0
      Subprojects/PEPObjCAdapterProtocols/PEPObjCAdapterProtocols/build-linux/GNUmakefile
  6. +24
    -205
      Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils.xcodeproj/project.pbxproj
  7. +0
    -166
      Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/NSArray+Engine.m
  8. +0
    -22
      Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/NSError+PEPStatus.m
  9. +0
    -81
      Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PEPIdentity+Engine.m
  10. +0
    -217
      Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PEPMessage+Engine.m
  11. +458
    -0
      Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PEPObjCTypeConversionUtil.m
  12. +0
    -12
      Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PEPObjCTypeUtils.m
  13. +45
    -45
      Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PEPStatusNSErrorUtil.m
  14. +0
    -27
      Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PEPTransport+Engine.m
  15. +0
    -36
      Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PublicHeaders/NSArray+Engine.h
  16. +0
    -22
      Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PublicHeaders/NSError+PEPStatus.h
  17. +0
    -27
      Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PublicHeaders/PEPIdentity+Engine.h
  18. +0
    -30
      Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PublicHeaders/PEPMessage+Engine.h
  19. +78
    -0
      Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PublicHeaders/PEPObjCTypeConversionUtil.h
  20. +4
    -3
      Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PublicHeaders/PEPObjCTypeUtils.h
  21. +26
    -0
      Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PublicHeaders/PEPStatusNSErrorUtil.h
  22. +0
    -27
      Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PublicHeaders/PEPTransport+Engine.h
  23. +49
    -0
      Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/build-linux/GNUmakefile
  24. +11
    -0
      Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/build-linux/build-dependencies.sh
  25. +11
    -0
      Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/build-linux/dependency_builder/build-PEPObjCTypes.sh
  26. +35
    -85
      Subprojects/PEPObjCTypes/PEPObjCTypes.xcodeproj/project.pbxproj
  27. +4
    -2
      Subprojects/PEPObjCTypes/PEPObjCTypes.xcodeproj/xcshareddata/xcschemes/PEPObjCTypesTests_iOS.xcscheme
  28. +10
    -0
      Subprojects/PEPObjCTypes/PEPObjCTypes.xcodeproj/xcshareddata/xcschemes/PEPObjCTypes_iOS.xcscheme
  29. +0
    -17
      Subprojects/PEPObjCTypes/PEPObjCTypes/PublicHeaders/PEPAttachment+SecureCoding.h
  30. +1
    -1
      Subprojects/PEPObjCTypes/PEPObjCTypes/PublicHeaders/PEPAttachment.h
  31. +18
    -0
      Subprojects/PEPObjCTypes/PEPObjCTypes/PublicHeaders/PEPErrors.h
  32. +0
    -17
      Subprojects/PEPObjCTypes/PEPObjCTypes/PublicHeaders/PEPIdentity+SecureCoding.h
  33. +1
    -1
      Subprojects/PEPObjCTypes/PEPObjCTypes/PublicHeaders/PEPIdentity.h
  34. +0
    -17
      Subprojects/PEPObjCTypes/PEPObjCTypes/PublicHeaders/PEPLanguage+SecureCoding.h
  35. +1
    -1
      Subprojects/PEPObjCTypes/PEPObjCTypes/PublicHeaders/PEPLanguage.h
  36. +0
    -17
      Subprojects/PEPObjCTypes/PEPObjCTypes/PublicHeaders/PEPMessage+SecureCoding.h
  37. +1
    -1
      Subprojects/PEPObjCTypes/PEPObjCTypes/PublicHeaders/PEPMessage.h
  38. +1
    -0
      Subprojects/PEPObjCTypes/PEPObjCTypes/PublicHeaders/PEPObjCTypes.h
  39. +44
    -0
      Subprojects/PEPObjCTypes/PEPObjCTypes/build-linux/GNUmakefile
  40. +0
    -26
      Subprojects/PEPObjCTypes/PEPObjCTypes/src/NSObject/NSObject+Extension.h
  41. +0
    -44
      Subprojects/PEPObjCTypes/PEPObjCTypes/src/NSObject/NSObject+Extension.m
  42. +26
    -0
      Subprojects/PEPObjCTypes/PEPObjCTypes/src/PEPAttachment.m
  43. +29
    -0
      Subprojects/PEPObjCTypes/PEPObjCTypes/src/PEPEqualableTools/PEPEqualableTools.h
  44. +40
    -0
      Subprojects/PEPObjCTypes/PEPObjCTypes/src/PEPEqualableTools/PEPEqualableTools.m
  45. +14
    -0
      Subprojects/PEPObjCTypes/PEPObjCTypes/src/PEPErrors.m
  46. +36
    -4
      Subprojects/PEPObjCTypes/PEPObjCTypes/src/PEPIdentity.m
  47. +22
    -0
      Subprojects/PEPObjCTypes/PEPObjCTypes/src/PEPLanguage.m
  48. +74
    -4
      Subprojects/PEPObjCTypes/PEPObjCTypes/src/PEPMessage.m
  49. +0
    -37
      Subprojects/PEPObjCTypes/PEPObjCTypes/src/SecureCoding/PEPAttachment+SecureCoding.m
  50. +0
    -43
      Subprojects/PEPObjCTypes/PEPObjCTypes/src/SecureCoding/PEPIdentity+SecureCoding.m
  51. +0
    -33
      Subprojects/PEPObjCTypes/PEPObjCTypes/src/SecureCoding/PEPLanguage+SecureCoding.m
  52. +0
    -84
      Subprojects/PEPObjCTypes/PEPObjCTypes/src/SecureCoding/PEPMessage+SecureCoding.m
  53. +1
    -1
      Subprojects/PEPObjCTypes/PEPObjCTypesTests_iOS/PEPAttachment+SecureCodingTest.m
  54. +1
    -1
      Subprojects/PEPObjCTypes/PEPObjCTypesTests_iOS/PEPIdentity+SecureCodingTest.m
  55. +1
    -1
      Subprojects/PEPObjCTypes/PEPObjCTypesTests_iOS/PEPLanguage+SecureCodingTest.m
  56. +3
    -4
      Subprojects/PEPObjCTypes/PEPObjCTypesTests_iOS/PEPMessage+SecureCodingTest.m
  57. +14
    -68
      pEpObjCAdapter.xcodeproj/project.pbxproj
  58. +0
    -31
      pEpObjCAdapter/Extensions/NSError+PEP+Internal.h
  59. +0
    -24
      pEpObjCAdapter/Extensions/NSError+PEP.h
  60. +3
    -1
      pEpObjCAdapter/PEPCopyableThread.m
  61. +77
    -77
      pEpObjCAdapter/PEPInternalSession.m
  62. +1
    -2
      pEpObjCAdapter/PEPObjCAdapter.m
  63. +4
    -6
      pEpObjCAdapter/PEPSession.m
  64. +3
    -10
      pEpObjCAdapter/PEPSessionProvider.m
  65. +11
    -10
      pEpObjCAdapter/PEPSync.m
  66. +57
    -0
      pEpObjCAdapter/build-linux/GNUmakefile
  67. +41
    -0
      pEpObjCAdapter/build-linux/README.md
  68. +7
    -0
      pEpObjCAdapter/build-linux/build-dependencies.sh
  69. +11
    -0
      pEpObjCAdapter/build-linux/dependency_builder/buildPEPObjCAdapterProtocols.sh
  70. +11
    -0
      pEpObjCAdapter/build-linux/dependency_builder/buildPEPObjCTypeUtils.sh
  71. +72
    -0
      pEpObjCAdapter/build-linux/test_project/GNUmakefile
  72. +16
    -0
      pEpObjCAdapter/build-linux/test_project/README.md
  73. +11
    -0
      pEpObjCAdapter/build-linux/test_project/build-dependencies.sh
  74. +99
    -0
      pEpObjCAdapter/build-linux/test_project/main.m
  75. +2
    -2
      pEpObjCTests/TestUtils/PEPInternalSession+SetIdentity.m

+ 14
- 1
.gitignore View File

@ -1,4 +1,17 @@
### Objective-C ###
##GNUstep
### Pre Compiled Headers
*.d
*.gch
*.pch
### Artefacts
*.so*
###
obj/
## Objective-C ##
# Xcode
## Build generated


+ 36
- 8
README.md View File

@ -1,6 +1,4 @@
WIP
HowToBuild static lib for macOS
# HowToBuild pEpObjCAdapter for macOS & iOS
## Deployment
@ -53,8 +51,8 @@ You need to have an Apple ID (connected to pEp team account) configured in Xcode
## Build Dependencies
```
mkdir src_pEpObjCAdapter_macOS
cd src_pEpObjCAdapter_macOS
mkdir src_pEpObjCAdapter
cd src_pEpObjCAdapter
git clone https://gitea.pep.foundation/buff/common-dependency-build-helpers-4-apple-hardware.git
git clone http://pep-security.lu/gitlab/iOS/pep-toolbox.git
@ -65,7 +63,7 @@ git clone https://gitea.pep.foundation/pEp.foundation/pEpEngine
git clone https://gitea.pep.foundation/pep.foundation/pEpObjCAdapter.git
```
## Build
## Build for iOS
### iOS Only: Copy System DB
@ -75,9 +73,34 @@ Backround: Has been introduces to use Apple Shared App Directory of the client A
### Using Xcode UI
`open pEpMacOSAdapter/pEpObjCAdapter.xcworkspace/`
`open pEpObjCAdapter/pEpObjCAdapter.xcworkspace/`
Build scheme "All" of pEpObjCAdapter.xcworkspace
Build scheme "pEpObjCAdapter_iOS".
### Using terminal
`xcodebuild -workspace "pEpObjCAdapter.xcworkspace" -scheme "PEPObjCAdapter_iOS" -configuration RELEASE`
(or DEBUG)
### Build Dir & Build Artefacts
You can find the build artefacts in the `pEpMacOSAdapter/build` folder
## Build for macOS
### Using Xcode UI
`open pEpObjCAdapter/pEpObjCAdapter.xcworkspace/`
Build scheme "PEPObjCAdapter_macOS".
### Using terminal
`xcodebuild -workspace "pEpObjCAdapter.xcworkspace" -scheme "PEPObjCAdapter_macOS" -configuration RELEASE`
(or DEBUG)
### Using terminal
@ -88,3 +111,8 @@ Build scheme "All" of pEpObjCAdapter.xcworkspace
### Build Dir & Build Artefacts
You can find the build artefacts in the `pEpMacOSAdapter/build` folder
# HowToBuild pEpObjCAdapter for Linux
See pEpObjCAdapter/pEpObjCAdapter/build-linux/README.md

+ 0
- 2
Subprojects/PEPObjCAdapterProtocols/PEPObjCAdapterProtocols/PEPSessionProtocol.m View File

@ -8,6 +8,4 @@
#import <Foundation/Foundation.h>
NSString * _Nonnull const PEPObjCAdapterEngineStatusErrorDomain = @"PEPObjCAdapterEngineStatusErrorDomain";
NSString * _Nonnull const PEPObjCAdapterErrorDomain = @"PEPObjCAdapterErrorDomain";

+ 0
- 3
Subprojects/PEPObjCAdapterProtocols/PEPObjCAdapterProtocols/PublicHeaders/PEPSessionProtocol.h View File

@ -17,9 +17,6 @@
NS_ASSUME_NONNULL_BEGIN
/// Domain for errors indicated by the pEp engine.
extern NSString *const _Nonnull PEPObjCAdapterEngineStatusErrorDomain;
/// Domain for errors indicated by the pEp adapter itself.
extern NSString *const _Nonnull PEPObjCAdapterErrorDomain;


+ 44
- 0
Subprojects/PEPObjCAdapterProtocols/PEPObjCAdapterProtocols/build-linux/GNUmakefile View File

@ -0,0 +1,44 @@
#
# Dox: http://www.gnustep.org/resources/documentation/make_1.html
#
# To Run: `make install messages=yes shared=no debug=yes
#
# Include the common variables defined by the Makefile Package
include $(GNUSTEP_MAKEFILES)/common.make
LIBRARY_NAME = pEpObjCAdapterProtocols
# Build pre-compiled prefix header
GNUSTEPHELPER_DIR=../../../../../pepgnustephelper
FLAGS_FOR_PRECOMPILED_HEADER_DEBUG="-MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNUSTEP_RUNTIME=1 -D_NONFRAGILE_ABI=1 -DGNUSTEP_BASE_LIBRARY=1 -I./obj/pEpObjCTypes.obj/PrecompiledHeaders/ObjC -fno-strict-aliasing -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -fobjc-runtime=gnustep-2.0 -fobjc-arc -fPIC -g -fblocks -fobjc-runtime=gnustep-2.0 -fblocks -fconstant-string-class=NSConstantString -I../PublicHeaders/ -I../src/ -I../src/PEPEqualableTools -I. -I/home/user/GNUstep/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/System/Library/Headers -fblocks -x objective-c -I/usr/include/libxml2 -I/usr/include/libxml2 -I/usr/include/p11-kit-1"
FLAGS_FOR_PRECOMPILED_HEADER_RELEASE="-MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNUSTEP_RUNTIME=1 -D_NONFRAGILE_ABI=1 -DGNUSTEP_BASE_LIBRARY=1 -I./obj/pEpObjCTypes.obj/PrecompiledHeaders/ObjC -fno-strict-aliasing -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -fobjc-runtime=gnustep-2.0 -fobjc-arc -fPIC -g -O2 -fblocks -fobjc-runtime=gnustep-2.0 -fblocks -fconstant-string-class=NSConstantString -I../PublicHeaders/ -I../src/ -I../src/PEPEqualableTools -I. -I/home/user/GNUstep/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/System/Library/Headers -fblocks -x objective-c -I/usr/include/libxml2 -I/usr/include/libxml2 -I/usr/include/p11-kit-1"
ifeq ($(debug), yes)
FLAGS_FOR_PRECOMPILED_HEADER = ${FLAGS_FOR_PRECOMPILED_HEADER_DEBUG}
else
FLAGS_FOR_PRECOMPILED_HEADER = ${FLAGS_FOR_PRECOMPILED_HEADER_RELEASE}
endif
SHELL_RESULT := $(shell ${GNUSTEPHELPER_DIR}/build-precompiled-header.sh ${FLAGS_FOR_PRECOMPILED_HEADER})
# Header Search Paths
PEP_OBJC_TYPES_HEADER_DIRS_PREFIXED := -I../../../PEPObjCTypes/PEPObjCTypes/PublicHeaders/
pEpObjCAdapterProtocols_INCLUDE_DIRS = -I../PublicHeaders/ ${PEP_OBJC_TYPES_HEADER_DIRS_PREFIXED}
# SRC Files
ALL_DOT_M_FILES := $(shell find ../ -type f -name "*.m")
pEpObjCAdapterProtocols_OBJC_FILES = ${ALL_DOT_M_FILES}
pEpObjCAdapterProtocols_RESOURCE_FILES =
# Build Settings
ADDITIONAL_OBJCFLAGS += -include-pch PEPObjCGNUStepOptimizations.h.gch -Winvalid-pch
ADDITIONAL_OBJC_LIBS = -ldispatch
ADDITIONAL_FLAGS = -fobjc-runtime=gnustep-2.0 -fobjc-arc -fPIC
pEpObjCAdapterProtocols_HEADER_FILES_INSTALL_DIR = build/include
# For lib
include $(GNUSTEP_MAKEFILES)/library.make
# Copy Artefacts
SHELL_RESULT := $(shell mkdir -p build)
SHELL_RESULT := $(shell cp obj/*.a build/)

+ 24
- 205
Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils.xcodeproj/project.pbxproj View File

@ -7,38 +7,17 @@
objects = {
/* Begin PBXBuildFile section */
1585EA8F26984D6B00B822E1 /* NSArray+Engine.m in Sources */ = {isa = PBXBuildFile; fileRef = 1585EA8926984D6B00B822E1 /* NSArray+Engine.m */; };
1585EA9026984D6B00B822E1 /* PEPIdentity+Engine.h in Headers */ = {isa = PBXBuildFile; fileRef = 1585EA8A26984D6B00B822E1 /* PEPIdentity+Engine.h */; settings = {ATTRIBUTES = (Public, ); }; };
1585EA9126984D6C00B822E1 /* PEPMessage+Engine.m in Sources */ = {isa = PBXBuildFile; fileRef = 1585EA8B26984D6B00B822E1 /* PEPMessage+Engine.m */; };
1585EA9226984D6C00B822E1 /* PEPIdentity+Engine.m in Sources */ = {isa = PBXBuildFile; fileRef = 1585EA8C26984D6B00B822E1 /* PEPIdentity+Engine.m */; };
1585EA9326984D6C00B822E1 /* NSArray+Engine.h in Headers */ = {isa = PBXBuildFile; fileRef = 1585EA8D26984D6B00B822E1 /* NSArray+Engine.h */; settings = {ATTRIBUTES = (Public, ); }; };
1585EA9426984D6C00B822E1 /* PEPMessage+Engine.h in Headers */ = {isa = PBXBuildFile; fileRef = 1585EA8E26984D6B00B822E1 /* PEPMessage+Engine.h */; settings = {ATTRIBUTES = (Public, ); }; };
1585EB4D2698648D00B822E1 /* NSArray+Engine.m in Sources */ = {isa = PBXBuildFile; fileRef = 1585EA8926984D6B00B822E1 /* NSArray+Engine.m */; };
1585EB50269864AA00B822E1 /* PEPMessage+Engine.h in Headers */ = {isa = PBXBuildFile; fileRef = 1585EA8E26984D6B00B822E1 /* PEPMessage+Engine.h */; settings = {ATTRIBUTES = (Public, ); }; };
1585EB51269864AA00B822E1 /* PEPIdentity+Engine.h in Headers */ = {isa = PBXBuildFile; fileRef = 1585EA8A26984D6B00B822E1 /* PEPIdentity+Engine.h */; settings = {ATTRIBUTES = (Public, ); }; };
1585EB52269864B100B822E1 /* PEPMessage+Engine.m in Sources */ = {isa = PBXBuildFile; fileRef = 1585EA8B26984D6B00B822E1 /* PEPMessage+Engine.m */; };
1585EB53269864B100B822E1 /* PEPIdentity+Engine.m in Sources */ = {isa = PBXBuildFile; fileRef = 1585EA8C26984D6B00B822E1 /* PEPIdentity+Engine.m */; };
1585EB54269864B600B822E1 /* NSArray+Engine.h in Headers */ = {isa = PBXBuildFile; fileRef = 1585EA8D26984D6B00B822E1 /* NSArray+Engine.h */; settings = {ATTRIBUTES = (Public, ); }; };
1585EBC32698A8FC00B822E1 /* PEPObjCTypeUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 1585EBC12698A8FC00B822E1 /* PEPObjCTypeUtils.h */; settings = {ATTRIBUTES = (Public, ); }; };
1585EBC42698A8FC00B822E1 /* PEPObjCTypeUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 1585EBC22698A8FC00B822E1 /* PEPObjCTypeUtils.m */; };
1585EC79269C3E1700B822E1 /* PEPObjCTypeUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 1585EBC12698A8FC00B822E1 /* PEPObjCTypeUtils.h */; settings = {ATTRIBUTES = (Public, ); }; };
1598062A26CFCA0000593C9D /* libPEPObjCTypes_iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1598060326CFC0C500593C9D /* libPEPObjCTypes_iOS.a */; };
159806AF26CFF14600593C9D /* PEPTransport+Engine.h in Headers */ = {isa = PBXBuildFile; fileRef = 159806AD26CFF14600593C9D /* PEPTransport+Engine.h */; settings = {ATTRIBUTES = (Public, ); }; };
159806B026CFF14600593C9D /* PEPTransport+Engine.h in Headers */ = {isa = PBXBuildFile; fileRef = 159806AD26CFF14600593C9D /* PEPTransport+Engine.h */; settings = {ATTRIBUTES = (Public, ); }; };
159806B126CFF14600593C9D /* PEPTransport+Engine.m in Sources */ = {isa = PBXBuildFile; fileRef = 159806AE26CFF14600593C9D /* PEPTransport+Engine.m */; };
159806B226CFF14600593C9D /* PEPTransport+Engine.m in Sources */ = {isa = PBXBuildFile; fileRef = 159806AE26CFF14600593C9D /* PEPTransport+Engine.m */; };
438EB9D4273BCE940023E81D /* libPEPObjCTypeUtils_macOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1585EA7C26984C4300B822E1 /* libPEPObjCTypeUtils_macOS.a */; };
438EB9DF273BCF0E0023E81D /* PEPMessageASN1Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 438EB9DE273BCF0E0023E81D /* PEPMessageASN1Tests.m */; };
438EBA1F273BE6CC0023E81D /* libpEpEngine_macOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1585EC93269C51EC00B822E1 /* libpEpEngine_macOS.a */; };
43FC2BED27393919004013DE /* PEPMessage+ASN1.h in Headers */ = {isa = PBXBuildFile; fileRef = 43FC2BE827393919004013DE /* PEPMessage+ASN1.h */; settings = {ATTRIBUTES = (Public, ); }; };
43FC2BEE27393919004013DE /* PEPMessage+ASN1.h in Headers */ = {isa = PBXBuildFile; fileRef = 43FC2BE827393919004013DE /* PEPMessage+ASN1.h */; settings = {ATTRIBUTES = (Public, ); }; };
43FC2BF027393959004013DE /* PEPMessage+ASN1.m in Sources */ = {isa = PBXBuildFile; fileRef = 43FC2BEF27393959004013DE /* PEPMessage+ASN1.m */; };
43FC2BF127393959004013DE /* PEPMessage+ASN1.m in Sources */ = {isa = PBXBuildFile; fileRef = 43FC2BEF27393959004013DE /* PEPMessage+ASN1.m */; };
4E5FB32626E6554000CDB7D4 /* NSError+PEPStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E5FB32426E6554000CDB7D4 /* NSError+PEPStatus.h */; };
4E5FB32726E6554000CDB7D4 /* NSError+PEPStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E5FB32426E6554000CDB7D4 /* NSError+PEPStatus.h */; };
4E5FB32826E6554000CDB7D4 /* NSError+PEPStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E5FB32526E6554000CDB7D4 /* NSError+PEPStatus.m */; };
4E5FB32926E6554000CDB7D4 /* NSError+PEPStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E5FB32526E6554000CDB7D4 /* NSError+PEPStatus.m */; };
4E5FB3F026E6697C00CDB7D4 /* PEPObjCTypeUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 1585EBC22698A8FC00B822E1 /* PEPObjCTypeUtils.m */; };
15BD2FB32734487F00B1B1F5 /* PEPObjCTypeConversionUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 15BD2FB12734487F00B1B1F5 /* PEPObjCTypeConversionUtil.h */; settings = {ATTRIBUTES = (Public, ); }; };
15BD2FB42734487F00B1B1F5 /* PEPObjCTypeConversionUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 15BD2FB12734487F00B1B1F5 /* PEPObjCTypeConversionUtil.h */; settings = {ATTRIBUTES = (Public, ); }; };
15BD2FB52734487F00B1B1F5 /* PEPObjCTypeConversionUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 15BD2FB22734487F00B1B1F5 /* PEPObjCTypeConversionUtil.m */; };
15BD2FB62734487F00B1B1F5 /* PEPObjCTypeConversionUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 15BD2FB22734487F00B1B1F5 /* PEPObjCTypeConversionUtil.m */; };
15BD31722742820400B1B1F5 /* PEPStatusNSErrorUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 15BD31702742820400B1B1F5 /* PEPStatusNSErrorUtil.h */; };
15BD31732742820400B1B1F5 /* PEPStatusNSErrorUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 15BD31702742820400B1B1F5 /* PEPStatusNSErrorUtil.h */; };
15BD31742742820400B1B1F5 /* PEPStatusNSErrorUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 15BD31712742820400B1B1F5 /* PEPStatusNSErrorUtil.m */; };
15BD31752742820400B1B1F5 /* PEPStatusNSErrorUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 15BD31712742820400B1B1F5 /* PEPStatusNSErrorUtil.m */; };
4E89010726CF900B00A683E9 /* libPEPObjCTypes_macOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4E51C1F926CD12EE007A2164 /* libPEPObjCTypes_macOS.a */; };
/* End PBXBuildFile section */
@ -113,13 +92,6 @@
remoteGlobalIDString = 4E575864268329A20084F02D;
remoteInfo = PEPObjCTypes_iOS;
};
438EB9D5273BCE940023E81D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1585EA7426984C4300B822E1 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 1585EA7B26984C4300B822E1;
remoteInfo = PEPObjCTypeUtils_macOS;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
@ -136,27 +108,15 @@
/* Begin PBXFileReference section */
1585EA7C26984C4300B822E1 /* libPEPObjCTypeUtils_macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPEPObjCTypeUtils_macOS.a; sourceTree = BUILT_PRODUCTS_DIR; };
1585EA8926984D6B00B822E1 /* NSArray+Engine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+Engine.m"; sourceTree = "<group>"; };
1585EA8A26984D6B00B822E1 /* PEPIdentity+Engine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "PEPIdentity+Engine.h"; sourceTree = "<group>"; };
1585EA8B26984D6B00B822E1 /* PEPMessage+Engine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "PEPMessage+Engine.m"; sourceTree = "<group>"; };
1585EA8C26984D6B00B822E1 /* PEPIdentity+Engine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "PEPIdentity+Engine.m"; sourceTree = "<group>"; };
1585EA8D26984D6B00B822E1 /* NSArray+Engine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+Engine.h"; sourceTree = "<group>"; };
1585EA8E26984D6B00B822E1 /* PEPMessage+Engine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "PEPMessage+Engine.h"; sourceTree = "<group>"; };
1585EACB269850B400B822E1 /* pEpEngine.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = pEpEngine.xcodeproj; path = "../../../pEpEngine/build-mac/pEpEngine.xcodeproj"; sourceTree = "<group>"; };
1585EB3D2698636C00B822E1 /* libPEPObjCTypeUtils_iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPEPObjCTypeUtils_iOS.a; sourceTree = BUILT_PRODUCTS_DIR; };
1585EBC12698A8FC00B822E1 /* PEPObjCTypeUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PEPObjCTypeUtils.h; sourceTree = "<group>"; };
1585EBC22698A8FC00B822E1 /* PEPObjCTypeUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PEPObjCTypeUtils.m; sourceTree = "<group>"; };
159805FA26CFC0C500593C9D /* PEPObjCTypes.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = PEPObjCTypes.xcodeproj; path = ../PEPObjCTypes/PEPObjCTypes.xcodeproj; sourceTree = "<group>"; };
159806AD26CFF14600593C9D /* PEPTransport+Engine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "PEPTransport+Engine.h"; sourceTree = "<group>"; };
159806AE26CFF14600593C9D /* PEPTransport+Engine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "PEPTransport+Engine.m"; sourceTree = "<group>"; };
438EB9CF273BCE940023E81D /* PEPObjCTypeUtilsTests_macOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PEPObjCTypeUtilsTests_macOS.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
438EB9D3273BCE940023E81D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
438EB9DE273BCF0E0023E81D /* PEPMessageASN1Tests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PEPMessageASN1Tests.m; sourceTree = "<group>"; };
43FC2BE827393919004013DE /* PEPMessage+ASN1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "PEPMessage+ASN1.h"; sourceTree = "<group>"; };
43FC2BEF27393959004013DE /* PEPMessage+ASN1.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "PEPMessage+ASN1.m"; sourceTree = "<group>"; };
15BD2FB12734487F00B1B1F5 /* PEPObjCTypeConversionUtil.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PEPObjCTypeConversionUtil.h; sourceTree = "<group>"; };
15BD2FB22734487F00B1B1F5 /* PEPObjCTypeConversionUtil.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PEPObjCTypeConversionUtil.m; sourceTree = "<group>"; };
15BD31702742820400B1B1F5 /* PEPStatusNSErrorUtil.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PEPStatusNSErrorUtil.h; sourceTree = "<group>"; };
15BD31712742820400B1B1F5 /* PEPStatusNSErrorUtil.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PEPStatusNSErrorUtil.m; sourceTree = "<group>"; };
4E51C1F926CD12EE007A2164 /* libPEPObjCTypes_macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libPEPObjCTypes_macOS.a; sourceTree = BUILT_PRODUCTS_DIR; };
4E5FB32426E6554000CDB7D4 /* NSError+PEPStatus.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSError+PEPStatus.h"; sourceTree = "<group>"; };
4E5FB32526E6554000CDB7D4 /* NSError+PEPStatus.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSError+PEPStatus.m"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -176,15 +136,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
438EB9CC273BCE940023E81D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
438EBA1F273BE6CC0023E81D /* libpEpEngine_macOS.a in Frameworks */,
438EB9D4273BCE940023E81D /* libPEPObjCTypeUtils_macOS.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
@ -194,7 +145,6 @@
159805FA26CFC0C500593C9D /* PEPObjCTypes.xcodeproj */,
1585EACB269850B400B822E1 /* pEpEngine.xcodeproj */,
1585EA7E26984C4300B822E1 /* PEPObjCTypeUtils */,
438EB9D0273BCE940023E81D /* PEPObjCTypeUtilsTests_macOS */,
1585EA7D26984C4300B822E1 /* Products */,
1585EADB269850C700B822E1 /* Frameworks */,
);
@ -205,7 +155,6 @@
children = (
1585EA7C26984C4300B822E1 /* libPEPObjCTypeUtils_macOS.a */,
1585EB3D2698636C00B822E1 /* libPEPObjCTypeUtils_iOS.a */,
438EB9CF273BCE940023E81D /* PEPObjCTypeUtilsTests_macOS.xctest */,
);
name = Products;
sourceTree = "<group>";
@ -214,13 +163,8 @@
isa = PBXGroup;
children = (
1585EA9526984DB800B822E1 /* PublicHeaders */,
1585EBC22698A8FC00B822E1 /* PEPObjCTypeUtils.m */,
159806AE26CFF14600593C9D /* PEPTransport+Engine.m */,
1585EA8B26984D6B00B822E1 /* PEPMessage+Engine.m */,
1585EA8C26984D6B00B822E1 /* PEPIdentity+Engine.m */,
1585EA8926984D6B00B822E1 /* NSArray+Engine.m */,
4E5FB32526E6554000CDB7D4 /* NSError+PEPStatus.m */,
43FC2BEF27393959004013DE /* PEPMessage+ASN1.m */,
15BD2FB22734487F00B1B1F5 /* PEPObjCTypeConversionUtil.m */,
15BD31712742820400B1B1F5 /* PEPStatusNSErrorUtil.m */,
);
path = PEPObjCTypeUtils;
sourceTree = "<group>";
@ -229,12 +173,8 @@
isa = PBXGroup;
children = (
1585EBC12698A8FC00B822E1 /* PEPObjCTypeUtils.h */,
159806AD26CFF14600593C9D /* PEPTransport+Engine.h */,
1585EA8E26984D6B00B822E1 /* PEPMessage+Engine.h */,
1585EA8A26984D6B00B822E1 /* PEPIdentity+Engine.h */,
1585EA8D26984D6B00B822E1 /* NSArray+Engine.h */,
4E5FB32426E6554000CDB7D4 /* NSError+PEPStatus.h */,
43FC2BE827393919004013DE /* PEPMessage+ASN1.h */,
15BD2FB12734487F00B1B1F5 /* PEPObjCTypeConversionUtil.h */,
15BD31702742820400B1B1F5 /* PEPStatusNSErrorUtil.h */,
);
path = PublicHeaders;
sourceTree = "<group>";
@ -267,15 +207,6 @@
name = Products;
sourceTree = "<group>";
};
438EB9D0273BCE940023E81D /* PEPObjCTypeUtilsTests_macOS */ = {
isa = PBXGroup;
children = (
438EB9DE273BCF0E0023E81D /* PEPMessageASN1Tests.m */,
438EB9D3273BCE940023E81D /* Info.plist */,
);
path = PEPObjCTypeUtilsTests_macOS;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
@ -283,13 +214,9 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
43FC2BED27393919004013DE /* PEPMessage+ASN1.h in Headers */,
4E5FB32626E6554000CDB7D4 /* NSError+PEPStatus.h in Headers */,
1585EA9426984D6C00B822E1 /* PEPMessage+Engine.h in Headers */,
1585EA9026984D6B00B822E1 /* PEPIdentity+Engine.h in Headers */,
15BD31722742820400B1B1F5 /* PEPStatusNSErrorUtil.h in Headers */,
15BD2FB32734487F00B1B1F5 /* PEPObjCTypeConversionUtil.h in Headers */,
1585EBC32698A8FC00B822E1 /* PEPObjCTypeUtils.h in Headers */,
159806AF26CFF14600593C9D /* PEPTransport+Engine.h in Headers */,
1585EA9326984D6C00B822E1 /* NSArray+Engine.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -297,13 +224,9 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
43FC2BEE27393919004013DE /* PEPMessage+ASN1.h in Headers */,
4E5FB32726E6554000CDB7D4 /* NSError+PEPStatus.h in Headers */,
1585EB51269864AA00B822E1 /* PEPIdentity+Engine.h in Headers */,
1585EB50269864AA00B822E1 /* PEPMessage+Engine.h in Headers */,
15BD31732742820400B1B1F5 /* PEPStatusNSErrorUtil.h in Headers */,
15BD2FB42734487F00B1B1F5 /* PEPObjCTypeConversionUtil.h in Headers */,
1585EC79269C3E1700B822E1 /* PEPObjCTypeUtils.h in Headers */,
159806B026CFF14600593C9D /* PEPTransport+Engine.h in Headers */,
1585EB54269864B600B822E1 /* NSArray+Engine.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -351,24 +274,6 @@
productReference = 1585EB3D2698636C00B822E1 /* libPEPObjCTypeUtils_iOS.a */;
productType = "com.apple.product-type.library.static";
};
438EB9CE273BCE940023E81D /* PEPObjCTypeUtilsTests_macOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = 438EB9DD273BCE940023E81D /* Build configuration list for PBXNativeTarget "PEPObjCTypeUtilsTests_macOS" */;
buildPhases = (
438EB9CB273BCE940023E81D /* Sources */,
438EB9CC273BCE940023E81D /* Frameworks */,
438EB9CD273BCE940023E81D /* Resources */,
);
buildRules = (
);
dependencies = (
438EB9D6273BCE940023E81D /* PBXTargetDependency */,
);
name = PEPObjCTypeUtilsTests_macOS;
productName = PEPObjCTypeUtilsTests_macOS;
productReference = 438EB9CF273BCE940023E81D /* PEPObjCTypeUtilsTests_macOS.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
@ -383,9 +288,6 @@
1585EB3C2698636C00B822E1 = {
CreatedOnToolsVersion = 12.5;
};
438EB9CE273BCE940023E81D = {
CreatedOnToolsVersion = 12.5;
};
};
};
buildConfigurationList = 1585EA7726984C4300B822E1 /* Build configuration list for PBXProject "PEPObjCTypeUtils" */;
@ -413,7 +315,6 @@
targets = (
1585EA7B26984C4300B822E1 /* PEPObjCTypeUtils_macOS */,
1585EB3C2698636C00B822E1 /* PEPObjCTypeUtils_iOS */,
438EB9CE273BCE940023E81D /* PEPObjCTypeUtilsTests_macOS */,
);
};
/* End PBXProject section */
@ -463,16 +364,6 @@
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
438EB9CD273BCE940023E81D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
1585EA9626984E6F00B822E1 /* Copy Artefacts to Custom Build Dir */ = {
isa = PBXShellScriptBuildPhase;
@ -518,13 +409,8 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1585EA9126984D6C00B822E1 /* PEPMessage+Engine.m in Sources */,
1585EA8F26984D6B00B822E1 /* NSArray+Engine.m in Sources */,
1585EA9226984D6C00B822E1 /* PEPIdentity+Engine.m in Sources */,
4E5FB32826E6554000CDB7D4 /* NSError+PEPStatus.m in Sources */,
43FC2BF027393959004013DE /* PEPMessage+ASN1.m in Sources */,
159806B126CFF14600593C9D /* PEPTransport+Engine.m in Sources */,
1585EBC42698A8FC00B822E1 /* PEPObjCTypeUtils.m in Sources */,
15BD2FB52734487F00B1B1F5 /* PEPObjCTypeConversionUtil.m in Sources */,
15BD31742742820400B1B1F5 /* PEPStatusNSErrorUtil.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -532,21 +418,8 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1585EB52269864B100B822E1 /* PEPMessage+Engine.m in Sources */,
1585EB4D2698648D00B822E1 /* NSArray+Engine.m in Sources */,
1585EB53269864B100B822E1 /* PEPIdentity+Engine.m in Sources */,
4E5FB3F026E6697C00CDB7D4 /* PEPObjCTypeUtils.m in Sources */,
43FC2BF127393959004013DE /* PEPMessage+ASN1.m in Sources */,
159806B226CFF14600593C9D /* PEPTransport+Engine.m in Sources */,
4E5FB32926E6554000CDB7D4 /* NSError+PEPStatus.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
438EB9CB273BCE940023E81D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
438EB9DF273BCF0E0023E81D /* PEPMessageASN1Tests.m in Sources */,
15BD2FB62734487F00B1B1F5 /* PEPObjCTypeConversionUtil.m in Sources */,
15BD31752742820400B1B1F5 /* PEPStatusNSErrorUtil.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -573,11 +446,6 @@
name = PEPObjCTypes_iOS;
targetProxy = 1598062E26CFCA8800593C9D /* PBXContainerItemProxy */;
};
438EB9D6273BCE940023E81D /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 1585EA7B26984C4300B822E1 /* PEPObjCTypeUtils_macOS */;
targetProxy = 438EB9D5273BCE940023E81D /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
@ -634,7 +502,6 @@
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
"${PROJECT_DIR}/../../../pEpEngine/build-mac/build/include/pEp",
"${PROJECT_DIR}/../../../pEpEngine/build-mac/build/include/",
"${PROJECT_DIR}/../PEPObjCTypes/build/include",
"${PROJECT_DIR}/../../../libpEpTransport/build-mac/build/include",
);
@ -693,7 +560,6 @@
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
"${PROJECT_DIR}/../../../pEpEngine/build-mac/build/include/pEp",
"${PROJECT_DIR}/../../../pEpEngine/build-mac/build/include/",
"${PROJECT_DIR}/../PEPObjCTypes/build/include",
"${PROJECT_DIR}/../../../libpEpTransport/build-mac/build/include",
);
@ -755,44 +621,6 @@
};
name = Release;
};
438EB9D7273BCE940023E81D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = NQLYU6MGPN;
INFOPLIST_FILE = PEPObjCTypeUtilsTests_macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.3;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = "security.pEp.PEPObjCTypeUtilsTests-macOS";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
438EB9D8273BCE940023E81D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = NQLYU6MGPN;
INFOPLIST_FILE = PEPObjCTypeUtilsTests_macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.3;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = "security.pEp.PEPObjCTypeUtilsTests-macOS";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
@ -823,15 +651,6 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
438EB9DD273BCE940023E81D /* Build configuration list for PBXNativeTarget "PEPObjCTypeUtilsTests_macOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
438EB9D7273BCE940023E81D /* Debug */,
438EB9D8273BCE940023E81D /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 1585EA7426984C4300B822E1 /* Project object */;


+ 0
- 166
Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/NSArray+Engine.m View File

@ -1,166 +0,0 @@
//
// NSArray+Engine.m
// pEpiOSAdapter
//
// Created by Dirk Zimmermann on 21.10.20.
// Copyright © 2020 pp. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "NSArray+Engine.h"
#import "PEPIdentity.h"
#import "PEPIdentity+Engine.h"
#import "PEPAttachment.h"
@implementation NSArray (Engine)
+ (instancetype)arrayFromStringlist:(stringlist_t * _Nonnull)stringList
{
NSMutableArray *array = [NSMutableArray array];
for (stringlist_t *_sl = stringList; _sl && _sl->value; _sl = _sl->next) {
[array addObject:[NSString stringWithUTF8String:_sl->value]];
}
return array;
}
+ (NSArray<PEPIdentity *> *)arrayFromIdentityList:(identity_list *)identityList
{
NSMutableArray *array = [NSMutableArray array];
for (identity_list *_il = identityList; _il && _il->ident; _il = _il->next) {
[array addObject:[PEPIdentity fromStruct:_il->ident]];
}
return array;
}
+ (instancetype)arrayFromStringPairlist:(stringpair_list_t * _Nonnull)stringPairList
{
NSMutableArray *array = [NSMutableArray array];
for (stringpair_list_t *_sl = stringPairList; _sl && _sl->value; _sl = _sl->next) {
[array addObject:[[NSMutableArray alloc ]initWithObjects:
[NSString stringWithUTF8String:_sl->value->key],
[NSString stringWithUTF8String:_sl->value->value],
nil]];
}
return array;
}
+ (instancetype)arrayFromBloblist:(bloblist_t * _Nonnull)blobList
{
NSMutableArray *array = [NSMutableArray array];
for (bloblist_t *_bl = blobList; _bl && _bl->value; _bl = _bl->next) {
PEPAttachment* theAttachment = [[PEPAttachment alloc]
initWithData:[NSData
dataWithBytes:_bl->value length:_bl->size]];
if(_bl->filename && _bl->filename[0]) {
theAttachment.filename = [NSString stringWithUTF8String:_bl->filename];
}
if(_bl->mime_type && _bl->mime_type[0]) {
theAttachment.mimeType = [NSString stringWithUTF8String:_bl->mime_type];
}
theAttachment.contentDisposition = (PEPContentDisposition) _bl->disposition;
[array addObject:theAttachment];
}
return array;
}
- (stringlist_t * _Nullable)toStringList
{
stringlist_t *sl = new_stringlist(NULL);
if (!sl)
return NULL;
stringlist_t *_sl = sl;
for (NSString *str in self) {
_sl = stringlist_add(_sl, [[str precomposedStringWithCanonicalMapping] UTF8String]);
}
return sl;
}
- (identity_list * _Nullable)toIdentityList
{
if (self.count == 0) {
return NULL;
}
identity_list *il = new_identity_list(NULL);
if (!il)
return NULL;
identity_list *_il = il;
for (PEPIdentity *address in self) {
_il = identity_list_add(_il, [address toStruct]);
}
return il;
}
- (stringpair_list_t * _Nullable)toStringPairlist
{
stringpair_list_t *sl = new_stringpair_list(NULL);
if (!sl)
return NULL;
stringpair_list_t *_sl = sl;
for (NSArray *pair in self) {
stringpair_t *_sp = new_stringpair(
[[pair[0] precomposedStringWithCanonicalMapping] UTF8String],
[[pair[1] precomposedStringWithCanonicalMapping] UTF8String]);
_sl = stringpair_list_add(_sl, _sp);
}
return sl;
}
- (bloblist_t * _Nullable)toBloblist
{
if (self.count == 0) {
return NULL;
}
bloblist_t *_bl = new_bloblist(NULL, 0, NULL, NULL);
if (!_bl) {
return NULL;
}
bloblist_t *bl =_bl;
// free() might be the default, but let's be explicit
bl->release_value = (void (*) (char *)) free;
for (PEPAttachment *theAttachment in self) {
NSData *data = theAttachment.data;
size_t size = [data length];
char *buf = malloc(size);
assert(buf);
memcpy(buf, [data bytes], size);
bl = bloblist_add(bl, buf, size,
[[theAttachment.mimeType
precomposedStringWithCanonicalMapping]
UTF8String],
[[theAttachment.filename
precomposedStringWithCanonicalMapping]
UTF8String]);
bl->disposition = (content_disposition_type) theAttachment.contentDisposition;
}
return _bl;
}
@end

+ 0
- 22
Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/NSError+PEPStatus.m View File

@ -1,22 +0,0 @@
//
// NSError+PEPStatus.m
// PEPObjCTypeUtils
//
// Created by David Alarcon on 6/9/21.
//
#import "NSError+PEPStatus.h"
@implementation NSError (PEPStatus)
/// Could in theory return a fully localized version of the underlying error.
NSString * _Nonnull localizedErrorStringFromPEPStatus(PEP_STATUS status) {
return stringFromPEPStatus(status);
}
NSString * _Nonnull stringFromPEPStatus(PEP_STATUS status) {
const char *pstrStatus = pEp_status_to_string(status);
return [NSString stringWithUTF8String:pstrStatus];
}
@end

+ 0
- 81
Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PEPIdentity+Engine.m View File

@ -1,81 +0,0 @@
//
// PEPIdentity+Engine.m
// pEpiOSAdapter
//
// Created by Dirk Zimmermann on 21.10.20.
// Copyright © 2020 pp. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "PEPIdentity+Engine.h"
@implementation PEPIdentity (Engine)
+ (instancetype _Nullable)fromStruct:(pEp_identity * _Nonnull)identityStruct
{
PEPIdentity *identity = nil;
if (identityStruct->address && identityStruct->address[0]) {
identity = [[PEPIdentity alloc]
initWithAddress:[NSString stringWithUTF8String:identityStruct->address]];
}
[identity overWriteFromStruct:identityStruct];
return identity;
}
- (pEp_identity *)toStruct
{
pEp_identity *ident = new_identity([[self.address
precomposedStringWithCanonicalMapping] UTF8String],
[[self.fingerPrint
precomposedStringWithCanonicalMapping] UTF8String],
[[self.userID
precomposedStringWithCanonicalMapping] UTF8String],
[[self.userName
precomposedStringWithCanonicalMapping] UTF8String]);
ident->me = self.isOwn;
ident->flags = self.flags;
if (self.language) {
strncpy(ident->lang, [[self.language
precomposedStringWithCanonicalMapping] UTF8String], 2);
}
ident->comm_type = (PEP_comm_type) self.commType;
return ident;
}
- (void)overWriteFromStruct:(pEp_identity * _Nonnull)identityStruct
{
if (identityStruct->address && identityStruct->address[0]) {
self.address = [NSString stringWithUTF8String:identityStruct->address];
}
if (identityStruct->fpr && identityStruct->fpr[0]) {
self.fingerPrint = [NSString stringWithUTF8String:identityStruct->fpr];
}
if (identityStruct->user_id && identityStruct->user_id[0]) {
self.userID = [NSString stringWithUTF8String:identityStruct->user_id];
}
if (identityStruct->username && identityStruct->username[0]) {
self.userName = [NSString stringWithUTF8String:identityStruct->username];
}
if (identityStruct->lang[0]) {
self.language = [NSString stringWithUTF8String:identityStruct->lang];
}
self.commType = (PEPCommType) identityStruct->comm_type;
self.isOwn = identityStruct->me;
self.flags = identityStruct->flags;
}
@end

+ 0
- 217
Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PEPMessage+Engine.m View File

@ -1,217 +0,0 @@
//
// PEPMessage+Engine.m
// pEpiOSAdapter
//
// Created by Dirk Zimmermann on 21.10.20.
// Copyright © 2020 pp. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "PEPMessage+Engine.h"
#import "pEp_string.h"
#import "PEPMessage.h"
#import "PEPIdentity+Engine.h"
#import "NSArray+Engine.h"
@implementation PEPMessage (Engine)
+ (instancetype _Nullable)fromStruct:(message * _Nullable)msg
{
if (!msg) {
return nil;
}
PEPMessage *theMessage = [PEPMessage new];
[theMessage overWriteFromStruct:msg];
return theMessage;
}
- (message * _Nullable)toStruct
{
PEP_msg_direction dir = self.direction == PEPMsgDirectionIncoming ? PEP_dir_incoming : PEP_dir_outgoing;
message *msg = new_message(dir);
if (!msg) {
return NULL;
}
if (self.messageID)
msg->id = new_string([[self.messageID precomposedStringWithCanonicalMapping]
UTF8String], 0);
if (self.shortMessage)
msg->shortmsg = new_string([[self.shortMessage
precomposedStringWithCanonicalMapping] UTF8String], 0);
if (self.sentDate)
msg->sent = new_timestamp([self.sentDate timeIntervalSince1970]);
if (self.receivedDate)
msg->recv = new_timestamp([self.receivedDate timeIntervalSince1970]);
if (self.from)
msg->from = [self.from toStruct];
if (self.to)
msg->to = [self.to toIdentityList];
if (self.receivedBy)
msg->recv_by = [self.receivedBy toStruct];
if (self.cc)
msg->cc = [self.cc toIdentityList];
if (self.bcc)
msg->bcc = [self.bcc toIdentityList];
if (self.replyTo)
msg->reply_to = [self.replyTo toIdentityList];
if (self.inReplyTo)
msg->in_reply_to = [self.inReplyTo toStringList];
if (self.references)
msg->references = [self.references toStringList];
if (self.keywords)
msg->keywords = [self.keywords toStringList];
if (self.optionalFields)
msg->opt_fields = [self.optionalFields toStringPairlist];
if (self.longMessage)
msg->longmsg = new_string([[self.longMessage
precomposedStringWithCanonicalMapping] UTF8String], 0);
if (self.longMessageFormatted)
msg->longmsg_formatted = new_string([[self.longMessageFormatted
precomposedStringWithCanonicalMapping]
UTF8String], 0);
if (self.attachments) {
msg->attachments = [self.attachments toBloblist];
}
return msg;
}
- (instancetype)removeEmptyRecipients
{
if (self.to.count == 0) {
self.to = nil;
}
if (self.cc.count == 0) {
self.cc = nil;
}
if (self.bcc.count == 0) {
self.bcc = nil;
}
return self;
}
- (void)overWriteFromStruct:(message * _Nonnull)message
{
[self reset];
self.direction = message->dir == PEP_dir_outgoing ? PEPMsgDirectionOutgoing : PEPMsgDirectionIncoming;
if (message->id) {
self.messageID = [NSString stringWithUTF8String:message->id];
}
if (message->shortmsg) {
self.shortMessage = [NSString stringWithUTF8String:message->shortmsg];
}
if (message->sent) {
self.sentDate = [NSDate dateWithTimeIntervalSince1970:timegm(message->sent)];
}
if (message->recv) {
self.receivedDate = [NSDate dateWithTimeIntervalSince1970:mktime(message->recv)];
}
if (message->from) {
self.from = [PEPIdentity fromStruct:message->from];
}
if (message->to && message->to->ident) {
self.to = [NSArray arrayFromIdentityList:message->to];
}
if (message->recv_by) {
self.receivedBy = [PEPIdentity fromStruct:message->recv_by];
}
if (message->cc && message->cc->ident) {
self.cc = [NSArray arrayFromIdentityList:message->cc];
}
if (message->bcc && message->bcc->ident) {
self.bcc = [NSArray arrayFromIdentityList:message->bcc];
}
if (message->reply_to && message->reply_to->ident) {
self.replyTo = [NSArray arrayFromIdentityList:message->reply_to];
}
if (message->in_reply_to) {
self.inReplyTo = [NSArray arrayFromStringlist:message->in_reply_to];
}
if (message->references && message->references->value) {
self.references = [NSArray arrayFromStringlist:message->references];
}
if (message->keywords && message->keywords->value) {
self.keywords = [NSArray arrayFromStringlist:message->keywords];
}
if (message->opt_fields) {
self.optionalFields = [NSArray arrayFromStringPairlist:message->opt_fields];
}
if (message->longmsg_formatted) {
self.longMessageFormatted = [NSString stringWithUTF8String:message->longmsg_formatted];
}
if (message->longmsg) {
self.longMessage = [NSString stringWithUTF8String:message->longmsg];
}
if (message->attachments && message->attachments->value) {
self.attachments = [NSArray arrayFromBloblist:message->attachments];
}
}
// MARK: - Private
- (void)reset
{
self.messageID = nil;
self.from = nil;
self.to = nil;
self.cc = nil;
self.bcc = nil;
self.shortMessage = nil;
self.longMessage = nil;
self.longMessageFormatted = nil;
self.replyTo = nil;
self.inReplyTo = nil;
self.references = nil;
self.sentDate = nil;
self.receivedDate = nil;
self.attachments = nil;
self.optionalFields = nil;
self.keywords = nil;
self.receivedBy = nil;
self.direction = (PEPMsgDirection) PEP_dir_incoming; // basically, 0
}
@end

+ 458
- 0
Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PEPObjCTypeConversionUtil.m View File

@ -0,0 +1,458 @@
//
// PEPObjCTypeConversionUtil.m
// PEPObjCTypeUtils
//
// Created by Andreas Buff on 04.11.21.
//
#import "PEPObjCTypeConversionUtil.h"
#import <PEPTransport.h>
#import <PEPAttachment.h>
#import <PEPMessage.h>
#import <PEPIdentity.h>
#import <pEp_string.h>
#import <status_to_string.h>
@implementation PEPObjCTypeConversionUtil
// MARK: - PEPTransport
+ (PEPTransport * _Nullable)pEpTransportfromStruct:(PEP_transport_t * _Nonnull)transportStruct
{
PEPTransport *result = nil;
NSAssert(false, @"unimplemented stub");
return result;
}
+ (PEP_transport_t *)structFromPEPTransport:(PEPTransport *)pEpTransport
{
PEP_transport_t *transportStruct = NULL;
NSAssert(false, @"unimplemented stub");
return transportStruct;
}
+ (void)overWritePEPTransportObject:(PEPTransport *)pEpTransport
withValuesFromStruct:(PEP_transport_t * _Nonnull)transportStruct
{
NSAssert(false, @"unimplemented stub");
}
// MARK: - PEPMessage
+ (PEPMessage * _Nullable)pEpMessagefromStruct:(message * _Nullable)msg
{
if (!msg) {
return nil;
}
PEPMessage *theMessage = [PEPMessage new];
[self overWritePEPMessageObject:theMessage withValuesFromStruct:msg];
return theMessage;
}
+ (message * _Nullable)structFromPEPMessage:(PEPMessage *)pEpMessage
{
PEP_msg_direction dir = pEpMessage.direction == PEPMsgDirectionIncoming ? PEP_dir_incoming : PEP_dir_outgoing;
message *msg = new_message(dir);
if (!msg) {
return NULL;
}
if (pEpMessage.messageID)
msg->id = new_string([[pEpMessage.messageID precomposedStringWithCanonicalMapping]
UTF8String], 0);
if (pEpMessage.shortMessage)
msg->shortmsg = new_string([[pEpMessage.shortMessage
precomposedStringWithCanonicalMapping] UTF8String], 0);
if (pEpMessage.sentDate)
msg->sent = new_timestamp([pEpMessage.sentDate timeIntervalSince1970]);
if (pEpMessage.receivedDate)
msg->recv = new_timestamp([pEpMessage.receivedDate timeIntervalSince1970]);
if (pEpMessage.from)
msg->from = [self structFromPEPIdentity:pEpMessage.from];
if (pEpMessage.to)
msg->to = [self arrayToIdentityList:pEpMessage.to];
if (pEpMessage.receivedBy)
msg->recv_by = [self structFromPEPIdentity:pEpMessage.receivedBy];
if (pEpMessage.cc)
msg->cc = [self arrayToIdentityList:pEpMessage.cc];
if (pEpMessage.bcc)
msg->bcc = [self arrayToIdentityList:pEpMessage.bcc];
if (pEpMessage.replyTo)
msg->reply_to = [self arrayToIdentityList:pEpMessage.replyTo];
if (pEpMessage.inReplyTo)
msg->in_reply_to = [self arrayToStringList:pEpMessage.inReplyTo];
if (pEpMessage.references)
msg->references = [self arrayToStringList:pEpMessage.references];
if (pEpMessage.keywords)
msg->keywords = [self arrayToStringList:pEpMessage.keywords];
if (pEpMessage.optionalFields)
msg->opt_fields = [self arrayToStringPairlist:pEpMessage.optionalFields];
if (pEpMessage.longMessage)
msg->longmsg = new_string([[pEpMessage.longMessage
precomposedStringWithCanonicalMapping] UTF8String], 0);
if (pEpMessage.longMessageFormatted)
msg->longmsg_formatted = new_string([[pEpMessage.longMessageFormatted
precomposedStringWithCanonicalMapping]
UTF8String], 0);
if (pEpMessage.attachments) {
msg->attachments = [self arrayToBloblist:pEpMessage.attachments];
}
return msg;
}
+ (void)overWritePEPMessageObject:(PEPMessage *)pEpMessage
withValuesFromStruct:(message * _Nonnull)message
{
[self resetPEPMessage:pEpMessage];
pEpMessage.direction = message->dir == PEP_dir_outgoing ? PEPMsgDirectionOutgoing : PEPMsgDirectionIncoming;
if (message->id) {
pEpMessage.messageID = [NSString stringWithUTF8String:message->id];
}
if (message->shortmsg) {
pEpMessage.shortMessage = [NSString stringWithUTF8String:message->shortmsg];
}
if (message->sent) {
pEpMessage.sentDate = [NSDate dateWithTimeIntervalSince1970:timegm(message->sent)];
}
if (message->recv) {
pEpMessage.receivedDate = [NSDate dateWithTimeIntervalSince1970:mktime(message->recv)];
}
if (message->from) {
pEpMessage.from = [self pEpIdentityfromStruct:message->from];
}
if (message->to && message->to->ident) {
pEpMessage.to = [self arrayFromIdentityList:message->to];
}
if (message->recv_by) {
pEpMessage.receivedBy = [self pEpIdentityfromStruct:message->recv_by];
}
if (message->cc && message->cc->ident) {
pEpMessage.cc = [self arrayFromIdentityList:message->cc];
}
if (message->bcc && message->bcc->ident) {
pEpMessage.bcc = [self arrayFromIdentityList:message->bcc];
}
if (message->reply_to && message->reply_to->ident) {
pEpMessage.replyTo = [self arrayFromIdentityList:message->reply_to];
}
if (message->in_reply_to) {
pEpMessage.inReplyTo = [self arrayFromStringlist:message->in_reply_to];
}
if (message->references && message->references->value) {
pEpMessage.references = [self arrayFromStringlist:message->references];
}
if (message->keywords && message->keywords->value) {
pEpMessage.keywords = [self arrayFromStringlist:message->keywords];
}
if (message->opt_fields) {
pEpMessage.optionalFields = [self arrayFromStringPairlist:message->opt_fields];
}
if (message->longmsg_formatted) {
pEpMessage.longMessageFormatted = [NSString stringWithUTF8String:message->longmsg_formatted];
}
if (message->longmsg) {
pEpMessage.longMessage = [NSString stringWithUTF8String:message->longmsg];
}
if (message->attachments && message->attachments->value) {
pEpMessage.attachments = [self arrayFromBloblist:message->attachments];
}
}
+ (void)removeEmptyRecipientsFromPEPMessage:(PEPMessage *)pEpMessage
{
if (pEpMessage.to.count == 0) {
pEpMessage.to = nil;
}
if (pEpMessage.cc.count == 0) {
pEpMessage.cc = nil;
}
if (pEpMessage.bcc.count == 0) {
pEpMessage.bcc = nil;
}
}
+ (PEPMessage *)pEpMessageWithEmptyRecipientsRemovedFromPEPMessage:(PEPMessage *)pEpMessage
{
[self removeEmptyRecipientsFromPEPMessage:pEpMessage];
return pEpMessage;
}
// MARK: - PRIVATE
+ (void)resetPEPMessage:(PEPMessage *)pEpMessage
{
pEpMessage.messageID = nil;
pEpMessage.from = nil;
pEpMessage.to = nil;
pEpMessage.cc = nil;
pEpMessage.bcc = nil;
pEpMessage.shortMessage = nil;
pEpMessage.longMessage = nil;
pEpMessage.longMessageFormatted = nil;
pEpMessage.replyTo = nil;
pEpMessage.inReplyTo = nil;
pEpMessage.references = nil;
pEpMessage.sentDate = nil;
pEpMessage.receivedDate = nil;
pEpMessage.attachments = nil;
pEpMessage.optionalFields = nil;
pEpMessage.keywords = nil;
pEpMessage.receivedBy = nil;
pEpMessage.direction = (PEPMsgDirection) PEP_dir_incoming; // basically, 0
}
// MARK: - PEPIdentity
+ (PEPIdentity * _Nullable)pEpIdentityfromStruct:(pEp_identity * _Nonnull)identityStruct
{
PEPIdentity *identity = nil;
if (identityStruct->address && identityStruct->address[0]) {
identity = [[PEPIdentity alloc]
initWithAddress:[NSString stringWithUTF8String:identityStruct->address]];
}
[self overWritePEPIdentityObject:identity withValuesFromStruct:identityStruct];
return identity;
}
+ (pEp_identity *)structFromPEPIdentity:(PEPIdentity *)pEpIdentity
{
pEp_identity *ident = new_identity([[pEpIdentity.address
precomposedStringWithCanonicalMapping] UTF8String],
[[pEpIdentity.fingerPrint
precomposedStringWithCanonicalMapping] UTF8String],
[[pEpIdentity.userID
precomposedStringWithCanonicalMapping] UTF8String],
[[pEpIdentity.userName
precomposedStringWithCanonicalMapping] UTF8String]);
ident->me = pEpIdentity.isOwn;
ident->flags = pEpIdentity.flags;
if (pEpIdentity.language) {
strncpy(ident->lang, [[pEpIdentity.language
precomposedStringWithCanonicalMapping] UTF8String], 2);
}
ident->comm_type = (PEP_comm_type) pEpIdentity.commType;
return ident;
}
+ (void)overWritePEPIdentityObject:(PEPIdentity *)pEpIdentity
withValuesFromStruct:(pEp_identity * _Nonnull)identityStruct
{
if (identityStruct->address && identityStruct->address[0]) {
pEpIdentity.address = [NSString stringWithUTF8String:identityStruct->address];
}
if (identityStruct->fpr && identityStruct->fpr[0]) {
pEpIdentity.fingerPrint = [NSString stringWithUTF8String:identityStruct->fpr];
}
if (identityStruct->user_id && identityStruct->user_id[0]) {
pEpIdentity.userID = [NSString stringWithUTF8String:identityStruct->user_id];
}
if (identityStruct->username && identityStruct->username[0]) {
pEpIdentity.userName = [NSString stringWithUTF8String:identityStruct->username];
}
if (identityStruct->lang[0]) {
pEpIdentity.language = [NSString stringWithUTF8String:identityStruct->lang];
}
pEpIdentity.commType = (PEPCommType) identityStruct->comm_type;
pEpIdentity.isOwn = identityStruct->me;
pEpIdentity.flags = identityStruct->flags;
}
// MARK: - NSArray <-> stringlist_t
+ (NSArray<NSString*> *)arrayFromStringlist:(stringlist_t * _Nonnull)stringList {
NSMutableArray *array = [NSMutableArray array];
for (stringlist_t *_sl = stringList; _sl && _sl->value; _sl = _sl->next) {
[array addObject:[NSString stringWithUTF8String:_sl->value]];
}
return array;
}
+ (stringlist_t * _Nullable)arrayToStringList:(NSArray<NSString*> *)array {
stringlist_t *sl = new_stringlist(NULL);
if (!sl) {
return NULL;
}
stringlist_t *_sl = sl;
for (NSString *str in array) {
_sl = stringlist_add(_sl, [[str precomposedStringWithCanonicalMapping] UTF8String]);
}
return sl;
}
// MARK: - NSArray <-> identity_list
+ (NSArray<PEPIdentity*> *)arrayFromIdentityList:(identity_list *)identityList {
NSMutableArray *array = [NSMutableArray array];
for (identity_list *_il = identityList; _il && _il->ident; _il = _il->next) {
[array addObject:[self pEpIdentityfromStruct:_il->ident]];
}
return array;
}
+ (identity_list * _Nullable)arrayToIdentityList:(NSArray<PEPIdentity*> *)array {
if (array.count == 0) {
return NULL;
}
identity_list *il = new_identity_list(NULL);
if (!il)
return NULL;
identity_list *_il = il;
for (PEPIdentity *identity in array) {
_il = identity_list_add(_il, [self structFromPEPIdentity:identity]);
}
return il;
}
// MARK: - NSArray <-> stringpair_list_t
+ (NSArray<NSArray<NSString*>*> *)arrayFromStringPairlist:(stringpair_list_t * _Nonnull)stringPairList {
NSMutableArray *array = [NSMutableArray array];
for (stringpair_list_t *_sl = stringPairList; _sl && _sl->value; _sl = _sl->next) {
[array addObject:[[NSMutableArray alloc ]initWithObjects:
[NSString stringWithUTF8String:_sl->value->key],
[NSString stringWithUTF8String:_sl->value->value],
nil]];
}
return array;
}
+ (stringpair_list_t * _Nullable)arrayToStringPairlist:(NSArray<NSArray<NSString*>*> *)array {
stringpair_list_t *sl = new_stringpair_list(NULL);
if (!sl)
return NULL;
stringpair_list_t *_sl = sl;
for (NSArray *pair in array) {
stringpair_t *_sp = new_stringpair(
[[pair[0] precomposedStringWithCanonicalMapping] UTF8String],
[[pair[1] precomposedStringWithCanonicalMapping] UTF8String]);
_sl = stringpair_list_add(_sl, _sp);
}
return sl;
}
// MARK: - NSArray<PEPAttachment*> <-> bloblist_t
+ (NSArray<PEPAttachment*> *)arrayFromBloblist:(bloblist_t * _Nonnull)blobList {
NSMutableArray *array = [NSMutableArray array];
for (bloblist_t *_bl = blobList; _bl && _bl->value; _bl = _bl->next) {
PEPAttachment* theAttachment = [[PEPAttachment alloc]
initWithData:[NSData dataWithBytes:_bl->value
length:_bl->size]];
if(_bl->filename && _bl->filename[0]) {
theAttachment.filename = [NSString stringWithUTF8String:_bl->filename];
}
if(_bl->mime_type && _bl->mime_type[0]) {
theAttachment.mimeType = [NSString stringWithUTF8String:_bl->mime_type];
}
theAttachment.contentDisposition = (PEPContentDisposition) _bl->disposition;
[array addObject:theAttachment];
}
return array;
}
+ (bloblist_t * _Nullable)arrayToBloblist:(NSArray<PEPAttachment*> *)array {
if (array.count == 0) {
return NULL;
}
bloblist_t *_bl = new_bloblist(NULL, 0, NULL, NULL);
if (!_bl) {
return NULL;
}
bloblist_t *bl =_bl;
// free() might be the default, but let's be explicit
bl->release_value = (void (*) (char *)) free;
for (PEPAttachment *theAttachment in array) {
NSData *data = theAttachment.data;
size_t size = [data length];
char *buf = malloc(size);
assert(buf);
memcpy(buf, [data bytes], size);
bl = bloblist_add(bl, buf, size,
[[theAttachment.mimeType
precomposedStringWithCanonicalMapping]
UTF8String],
[[theAttachment.filename
precomposedStringWithCanonicalMapping]
UTF8String]);
bl->disposition = (content_disposition_type) theAttachment.contentDisposition;
}
return _bl;
}
@end

+ 0
- 12
Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PEPObjCTypeUtils.m View File

@ -1,12 +0,0 @@
//
// PEPObjCTypeUtils.m
// PEPObjCTypeUtils
//
// Created by Andreas Buff on 09.07.21.
//
#import "PEPObjCTypeUtils.h"
@implementation PEPObjCTypeUtils
@end

pEpObjCAdapter/Extensions/NSError+PEP.m → Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PEPStatusNSErrorUtil.m View File


+ 0
- 27
Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PEPTransport+Engine.m View File

@ -1,27 +0,0 @@
#import <Foundation/Foundation.h>
#import "PEPTransport+Engine.h"
@implementation PEPTransport (Engine)
+ (instancetype _Nullable)fromStruct:(PEP_transport_t * _Nonnull)transportStruct
{
PEPTransport *result = nil;
NSAssert(false, @"unimplemented stub");
return result;
}
- (PEP_transport_t *)toStruct
{
PEP_transport_t *transportStruct = NULL;
NSAssert(false, @"unimplemented stub");
return transportStruct;
}
- (void)overWriteFromStruct:(PEP_transport_t * _Nonnull)transportStruct
{
NSAssert(false, @"unimplemented stub");
}
@end

+ 0
- 36
Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PublicHeaders/NSArray+Engine.h View File

@ -1,36 +0,0 @@
//
// NSArray+Engine.h
// pEpiOSAdapter
//
// Created by Dirk Zimmermann on 21.10.20.
// Copyright © 2020 pp. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "stringlist.h"
#import "identity_list.h"
#import "bloblist.h"
@class PEPIdentity;
NS_ASSUME_NONNULL_BEGIN
@interface NSArray (Engine)
+ (instancetype)arrayFromStringlist:(stringlist_t *)stringList;
+ (NSArray<PEPIdentity *> *)arrayFromIdentityList:(identity_list *)identityList;
+ (instancetype)arrayFromStringPairlist:(stringpair_list_t * _Nonnull)stringPairList;
+ (instancetype)arrayFromBloblist:(bloblist_t * _Nonnull)blobList;