Browse Source

Merge branch 'master' into IOSAD-227

IOSAD-227
Dirk Zimmermann 1 week ago
parent
commit
2958b86531
25 changed files with 360 additions and 476 deletions
  1. +4
    -1
      .gitignore
  2. +0
    -44
      Subprojects/PEPObjCAdapterProtocols/build-linux/GNUmakefile
  3. +19
    -0
      Subprojects/PEPObjCAdapterProtocols/build-linux/Makefile
  4. +1
    -11
      Subprojects/PEPObjCTypeUtils/PublicHeaders/PEPObjCTypeConversionUtil.h
  5. +0
    -49
      Subprojects/PEPObjCTypeUtils/build-linux/GNUmakefile
  6. +28
    -0
      Subprojects/PEPObjCTypeUtils/build-linux/Makefile
  7. +112
    -86
      Subprojects/PEPObjCTypeUtils/build-mac/PEPObjCTypeUtils.xcodeproj/project.pbxproj
  8. +5
    -7
      Subprojects/PEPObjCTypeUtils/src/PEPMessage+ASN1.m
  9. +0
    -23
      Subprojects/PEPObjCTypeUtils/src/PEPObjCTypeConversionUtil.m
  10. +0
    -2
      Subprojects/PEPObjCTypes/PublicHeaders/PEPIdentity.h
  11. +1
    -0
      Subprojects/PEPObjCTypes/PublicHeaders/PEPObjCTypes.h
  12. +0
    -17
      Subprojects/PEPObjCTypes/PublicHeaders/PEPTransport.h
  13. +1
    -2
      Subprojects/PEPObjCTypes/PublicHeaders/PEPTransportConfig.h
  14. +0
    -44
      Subprojects/PEPObjCTypes/build-linux/GNUmakefile
  15. +20
    -0
      Subprojects/PEPObjCTypes/build-linux/Makefile
  16. +65
    -33
      Subprojects/PEPObjCTypes/build-mac/PEPObjCTypes.xcodeproj/project.pbxproj
  17. +0
    -0
      Subprojects/PEPObjCTypes/build-mac/PEPObjCTypes_iOS/pEpObjCTypesModuleMap.modulemap
  18. +0
    -0
      Subprojects/PEPObjCTypes/build-mac/PEPObjCTypes_macOS/pEpObjCTypesModuleMap.modulemap
  19. +0
    -20
      Subprojects/PEPObjCTypes/src/PEPTransport.m
  20. +1
    -2
      Subprojects/PEPObjCTypes/src/PEPTransportConfig.m
  21. +0
    -57
      build-linux/GNUmakefile
  22. +27
    -0
      build-linux/Makefile
  23. +0
    -72
      build-linux/test_project/GNUmakefile
  24. +39
    -0
      build-linux/test_project/Makefile
  25. +37
    -6
      src/PEPObjCAdapter.m

+ 4
- 1
.gitignore View File

@ -1,4 +1,5 @@
##GNUstep
# pEp build config
local.conf
### Pre Compiled Headers
*.d
@ -7,6 +8,8 @@
### Artefacts
*.so*
*.a
*.o
###
obj/


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

@ -1,44 +0,0 @@
#
# 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/)

+ 19
- 0
Subprojects/PEPObjCAdapterProtocols/build-linux/Makefile View File

@ -0,0 +1,19 @@
# Content of this library
TARGET = libPEPObjCAdapterProtocols
OBJECTS = $(call find-objects,..)
DEPFILES = $(call find-deps,..)
HEADERS = $(call find-headers,../PublicHeaders/)
# Dependencies *within* this repo (other headers should be installed and found in $PREFIX).
INCLUDES = \
$(call find-includes,..)
# Only for making .so libs. Libs for static linking are defined with the final binary.
LIBS =
# Load the shared pEp ObjC Makefile.
MAKEFILE_COMMON ?= ../../../../../pepgnustephelper/
include $(MAKEFILE_COMMON)/Makefile.common
# This enables proper header-dependencies based on .d files made by the compiler.
include $(DEPFILES)

+ 1
- 11
Subprojects/PEPObjCTypeUtils/PublicHeaders/PEPObjCTypeConversionUtil.h View File

@ -7,9 +7,8 @@
#import <Foundation/Foundation.h>
#import "transport.h"
#import <transport.h>
@class PEPTransport;
@class PEPMessage;
@class PEPIdentity;
@class PEPAttachment;
@ -18,15 +17,6 @@ NS_ASSUME_NONNULL_BEGIN
@interface PEPObjCTypeConversionUtil : NSObject
// MARK: - PEPTransport
+ (PEPTransport * _Nullable)pEpTransportfromStruct:(PEP_transport_t * _Nonnull)transportStruct;
+ (PEP_transport_t *)structFromPEPTransport:(PEPTransport *)pEpTransport;
+ (void)overWritePEPTransportObject:(PEPTransport *)pEpTransport
withValuesFromStruct:(PEP_transport_t * _Nonnull)transportStruct;
// MARK: - PEPMessage
+ (PEPMessage * _Nullable)pEpMessagefromStruct:(message * _Nullable)msg;


+ 0
- 49
Subprojects/PEPObjCTypeUtils/build-linux/GNUmakefile View File

@ -1,49 +0,0 @@
#
# 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 = pEpObjCTypeUtils
# Build Dependencies ...
SHELL_RESULT := $(shell ./build-dependencies.sh)
# 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})
# Keep. Useful to manually figure out flags for precompiled header.
#pEpObjCTypeUtils_OBJC_PRECOMPILED_HEADERS = PEPObjCGNUStepOptimizations.h
# Finds all dirs containing headers and prefixes with "-I"
ALL_LOCAL_INCLUDE_HEADER_DIRS_PREFIXED := $(shell find ~/local/include/ -type d | sed -e 's/^/-I/;')
PEP_OBJC_TYPES_HEADER_DIRS_PREFIXED := $(shell find ../../../PEPObjCTypes/PEPObjCTypes/PublicHeaders/ -type d | sed -e 's/^/-I/;')
pEpObjCTypeUtils_INCLUDE_DIRS = -I../PublicHeaders/ ${ALL_LOCAL_INCLUDE_HEADER_DIRS_PREFIXED} ${PEP_OBJC_TYPES_HEADER_DIRS_PREFIXED}
ALL_DOT_M_FILES := $(shell find ../ -type f -name "*.m")
pEpObjCTypeUtils_OBJC_FILES = ${ALL_DOT_M_FILES}
pEpObjCTypeUtils_RESOURCE_FILES =
ADDITIONAL_OBJCFLAGS += -include-pch PEPObjCGNUStepOptimizations.h.gch -Winvalid-pch
ADDITIONAL_OBJC_LIBS = -ldispatch
ADDITIONAL_FLAGS = -fobjc-runtime=gnustep-2.0 -fobjc-arc -fPIC
HEADER_FILES_INSTALL_DIR = build
# For lib
include $(GNUSTEP_MAKEFILES)/library.make
# Copy Artefacts
SHELL_RESULT := $(shell mkdir -p build)
SHELL_RESULT := $(shell cp obj/*.a build/)

+ 28
- 0
Subprojects/PEPObjCTypeUtils/build-linux/Makefile View File

@ -0,0 +1,28 @@
root = ../../../../
# Content of this library
TARGET = libPEPObjCTypeUtils
OBJECTS = $(call find-objects,..)
DEPFILES = $(call find-deps,..)
HEADERS = $(call find-headers,../PublicHeaders)
# Dependencies *within* this repo (other headers should be installed and found in $PREFIX).
# PEP_INCLUDE is the pEp/ folder (since we don't prefix headers here), PEP_SRC
# is the engine source directory, since we may use uninstalled headers.
INCLUDES = \
-I$(PEP_INCLUDE) \
$(call find-includes,..)
# Only for making .so libs. Libs for static linking are defined with the final binary.
LIBS = -lpEpEngine -lasn1 -lPEPObjCTypes
# Load the shared pEp ObjC Makefile.
MAKEFILE_COMMON ?= ../../../../../pepgnustephelper/
include $(MAKEFILE_COMMON)/Makefile.common
print:
echo $(OBJECTS)
# This enables proper header-dependencies based on .d files made by the compiler.
include $(DEPFILES)

+ 112
- 86
Subprojects/PEPObjCTypeUtils/build-mac/PEPObjCTypeUtils.xcodeproj/project.pbxproj View File

@ -7,8 +7,11 @@
objects = {
/* Begin PBXBuildFile section */
150B1946276B460B001A7D03 /* libPEPObjCTypes_macOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1598060126CFC0C500593C9D /* libPEPObjCTypes_macOS.a */; };
1554D09D2757C72E00529E81 /* libpEpEngine_macOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1585EC93269C51EC00B822E1 /* libpEpEngine_macOS.a */; };
1585EBC32698A8FC00B822E1 /* PEPObjCTypeUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 1585EBC12698A8FC00B822E1 /* PEPObjCTypeUtils.h */; settings = {ATTRIBUTES = (Public, ); }; };
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 */; };
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 */; };
@ -17,80 +20,92 @@
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 */; };
431ABA5327590FB100017E1B /* libpEpEngine_macOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 431ABA4E27590F9E00017E1B /* libpEpEngine_macOS.a */; };
43B0EAC0274D1E7B00F5D076 /* PEPMessage+ASN1.m in Sources */ = {isa = PBXBuildFile; fileRef = 43B0EABB274D1E7B00F5D076 /* PEPMessage+ASN1.m */; };
43B0EAC1274D1E7B00F5D076 /* PEPMessage+ASN1.m in Sources */ = {isa = PBXBuildFile; fileRef = 43B0EABB274D1E7B00F5D076 /* PEPMessage+ASN1.m */; };
43B0EAC3274D1EA700F5D076 /* PEPMessage+ASN1.h in Headers */ = {isa = PBXBuildFile; fileRef = 43B0EAC2274D1EA700F5D076 /* PEPMessage+ASN1.h */; };
43B0EAC4274D1EA700F5D076 /* PEPMessage+ASN1.h in Headers */ = {isa = PBXBuildFile; fileRef = 43B0EAC2274D1EA700F5D076 /* PEPMessage+ASN1.h */; };
43B0EAD5274D21E100F5D076 /* libPEPObjCTypeUtils_macOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1585EA7C26984C4300B822E1 /* libPEPObjCTypeUtils_macOS.a */; };
43B0EAE0274D222000F5D076 /* PEPMessageASN1Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 43B0EADF274D222000F5D076 /* PEPMessageASN1Tests.m */; };
43C4E2B6275F5D82005DEE69 /* libPEPObjCTypes_macOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 431ABA5C27590FE700017E1B /* libPEPObjCTypes_macOS.a */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
431ABA4B27590F9E00017E1B /* PBXContainerItemProxy */ = {
1585EC90269C51EC00B822E1 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 431ABA3D27590F9E00017E1B /* pEpEngine.xcodeproj */;
containerPortal = 1585EACB269850B400B822E1 /* pEpEngine.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 64796A3F1B455AA5004B1C24;
remoteInfo = pEpEngine;
};
431ABA4D27590F9E00017E1B /* PBXContainerItemProxy */ = {
1585EC92269C51EC00B822E1 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 431ABA3D27590F9E00017E1B /* pEpEngine.xcodeproj */;
containerPortal = 1585EACB269850B400B822E1 /* pEpEngine.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 1552DB112577D4F100A92F71;
remoteInfo = pEpEngine_macOS;
};
431ABA4F27590F9E00017E1B /* PBXContainerItemProxy */ = {
1585EC94269C51EC00B822E1 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 431ABA3D27590F9E00017E1B /* pEpEngine.xcodeproj */;
containerPortal = 1585EACB269850B400B822E1 /* pEpEngine.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 644297BF1BE11C65002BC73B;
remoteInfo = pEpTrustWords;
};
431ABA5127590FA900017E1B /* PBXContainerItemProxy */ = {
1585ECC3269C5A0800B822E1 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 431ABA3D27590F9E00017E1B /* pEpEngine.xcodeproj */;
containerPortal = 1585EACB269850B400B822E1 /* pEpEngine.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 1552DB102577D4F100A92F71;
remoteInfo = pEpEngine_macOS;
};
431ABA5B27590FE700017E1B /* PBXContainerItemProxy */ = {
1585ED59269C6B9F00B822E1 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 431ABA5427590FE700017E1B /* PEPObjCTypes.xcodeproj */;
containerPortal = 1585EACB269850B400B822E1 /* pEpEngine.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 64796A3E1B455AA5004B1C24;
remoteInfo = pEpEngine;
};
1598060026CFC0C500593C9D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 159805FA26CFC0C500593C9D /* PEPObjCTypes.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 4E575858268329170084F02D;
remoteInfo = PEPObjCTypes_macOS;
};
431ABA5D27590FE700017E1B /* PBXContainerItemProxy */ = {
1598060226CFC0C500593C9D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 431ABA5427590FE700017E1B /* PEPObjCTypes.xcodeproj */;
containerPortal = 159805FA26CFC0C500593C9D /* PEPObjCTypes.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 4E575865268329A20084F02D;
remoteInfo = PEPObjCTypes_iOS;
};
431ABA5F27590FE700017E1B /* PBXContainerItemProxy */ = {
1598060426CFC0C500593C9D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 431ABA5427590FE700017E1B /* PEPObjCTypes.xcodeproj */;
containerPortal = 159805FA26CFC0C500593C9D /* PEPObjCTypes.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 4E5758BF26833D140084F02D;
remoteInfo = PEPObjCTypesTests_iOS;
};
431ABA6127590FE700017E1B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 431ABA5427590FE700017E1B /* PEPObjCTypes.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 439F4C36275632B2005F278E;
remoteInfo = PEPObjCTypesTests_macOS;
};
431ABA6327590FF100017E1B /* PBXContainerItemProxy */ = {
1598060E26CFC2E000593C9D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 431ABA5427590FE700017E1B /* PEPObjCTypes.xcodeproj */;
containerPortal = 159805FA26CFC0C500593C9D /* PEPObjCTypes.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 4E575857268329170084F02D;
remoteInfo = PEPObjCTypes_macOS;
};
1598062E26CFCA8800593C9D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 159805FA26CFC0C500593C9D /* PEPObjCTypes.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 4E575864268329A20084F02D;
remoteInfo = PEPObjCTypes_iOS;
};
4372DD9D2758CF61005A2997 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 159805FA26CFC0C500593C9D /* PEPObjCTypes.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 439F4C36275632B2005F278E;
remoteInfo = PEPObjCTypesTests_macOS;
};
43B0EAD6274D21E100F5D076 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1585EA7426984C4300B822E1 /* Project object */;
@ -114,14 +129,14 @@
/* Begin PBXFileReference section */
1585EA7C26984C4300B822E1 /* libPEPObjCTypeUtils_macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPEPObjCTypeUtils_macOS.a; sourceTree = BUILT_PRODUCTS_DIR; };
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>"; };
159805FA26CFC0C500593C9D /* PEPObjCTypes.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = PEPObjCTypes.xcodeproj; path = ../PEPObjCTypes/PEPObjCTypes.xcodeproj; 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>"; };
431ABA3D27590F9E00017E1B /* pEpEngine.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = pEpEngine.xcodeproj; path = "../../../../pEpEngine/build-mac/pEpEngine.xcodeproj"; sourceTree = "<group>"; };
431ABA5427590FE700017E1B /* PEPObjCTypes.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = PEPObjCTypes.xcodeproj; path = "../../PEPObjCTypes/build-mac/PEPObjCTypes.xcodeproj"; sourceTree = "<group>"; };
43B0EABB274D1E7B00F5D076 /* PEPMessage+ASN1.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "PEPMessage+ASN1.m"; sourceTree = "<group>"; };
43B0EAC2274D1EA700F5D076 /* PEPMessage+ASN1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "PEPMessage+ASN1.h"; sourceTree = "<group>"; };
43B0EAD1274D21E100F5D076 /* PEPObjCTypeUtilsTests_macOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PEPObjCTypeUtilsTests_macOS.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
@ -134,7 +149,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
431ABA5327590FB100017E1B /* libpEpEngine_macOS.a in Frameworks */,
1554D09D2757C72E00529E81 /* libpEpEngine_macOS.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -142,6 +157,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
1598062A26CFCA0000593C9D /* libPEPObjCTypes_iOS.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -149,7 +165,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
43C4E2B6275F5D82005DEE69 /* libPEPObjCTypes_macOS.a in Frameworks */,
150B1946276B460B001A7D03 /* libPEPObjCTypes_macOS.a in Frameworks */,
43B0EAD5274D21E100F5D076 /* libPEPObjCTypeUtils_macOS.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@ -160,11 +176,10 @@
1585EA7326984C4300B822E1 = {
isa = PBXGroup;
children = (
431ABA5427590FE700017E1B /* PEPObjCTypes.xcodeproj */,
431ABA3D27590F9E00017E1B /* pEpEngine.xcodeproj */,
1585EA9526984DB800B822E1 /* PublicHeaders */,
1585EA7E26984C4300B822E1 /* src */,
43B0EAD2274D21E100F5D076 /* PEPObjCTypeUtilsTests */,
159805FA26CFC0C500593C9D /* PEPObjCTypes.xcodeproj */,
1585EACB269850B400B822E1 /* pEpEngine.xcodeproj */,
1585EA7E26984C4300B822E1 /* PEPObjCTypeUtils */,
43B0EAD2274D21E100F5D076 /* PEPObjCTypeUtilsTests_macOS */,
1585EA7D26984C4300B822E1 /* Products */,
1585EADB269850C700B822E1 /* Frameworks */,
);
@ -180,15 +195,15 @@
name = Products;
sourceTree = "<group>";
};
1585EA7E26984C4300B822E1 /* src */ = {
1585EA7E26984C4300B822E1 /* PEPObjCTypeUtils */ = {
isa = PBXGroup;
children = (
1585EA9526984DB800B822E1 /* PublicHeaders */,
15BD2FB22734487F00B1B1F5 /* PEPObjCTypeConversionUtil.m */,
15BD31712742820400B1B1F5 /* PEPStatusNSErrorUtil.m */,
43B0EABB274D1E7B00F5D076 /* PEPMessage+ASN1.m */,
);
name = src;
path = ../src;
path = PEPObjCTypeUtils;
sourceTree = "<group>";
};
1585EA9526984DB800B822E1 /* PublicHeaders */ = {
@ -199,8 +214,7 @@
15BD31702742820400B1B1F5 /* PEPStatusNSErrorUtil.h */,
43B0EAC2274D1EA700F5D076 /* PEPMessage+ASN1.h */,
);
name = PublicHeaders;
path = ../PublicHeaders;
path = PublicHeaders;
sourceTree = "<group>";
};
1585EADB269850C700B822E1 /* Frameworks */ = {
@ -211,33 +225,33 @@
name = Frameworks;
sourceTree = "<group>";
};
431ABA3E27590F9E00017E1B /* Products */ = {
1585EC8A269C51EC00B822E1 /* Products */ = {
isa = PBXGroup;
children = (
431ABA4C27590F9E00017E1B /* libpEpEngine.a */,
431ABA4E27590F9E00017E1B /* libpEpEngine_macOS.a */,
431ABA5027590F9E00017E1B /* pEpTrustWords.bundle */,
1585EC91269C51EC00B822E1 /* libpEpEngine.a */,
1585EC93269C51EC00B822E1 /* libpEpEngine_macOS.a */,
1585EC95269C51EC00B822E1 /* pEpTrustWords.bundle */,
);
name = Products;
sourceTree = "<group>";
};
431ABA5527590FE700017E1B /* Products */ = {
159805FB26CFC0C500593C9D /* Products */ = {
isa = PBXGroup;
children = (
431ABA5C27590FE700017E1B /* libPEPObjCTypes_macOS.a */,
431ABA5E27590FE700017E1B /* libPEPObjCTypes_iOS.a */,
431ABA6027590FE700017E1B /* PEPObjCTypesTests_iOS.xctest */,
431ABA6227590FE700017E1B /* PEPObjCTypesTests_macOS.xctest */,
1598060126CFC0C500593C9D /* libPEPObjCTypes_macOS.a */,
1598060326CFC0C500593C9D /* libPEPObjCTypes_iOS.a */,
1598060526CFC0C500593C9D /* PEPObjCTypesTests_iOS.xctest */,
4372DD9E2758CF61005A2997 /* PEPObjCTypesTests_macOS.xctest */,
);
name = Products;
sourceTree = "<group>";
};
43B0EAD2274D21E100F5D076 /* PEPObjCTypeUtilsTests */ = {
43B0EAD2274D21E100F5D076 /* PEPObjCTypeUtilsTests_macOS */ = {
isa = PBXGroup;
children = (
43B0EADF274D222000F5D076 /* PEPMessageASN1Tests.m */,
);
path = PEPObjCTypeUtilsTests;
path = PEPObjCTypeUtilsTests_macOS;
sourceTree = "<group>";
};
/* End PBXGroup section */
@ -275,13 +289,13 @@
1585EA7826984C4300B822E1 /* Headers */,
1585EA7926984C4300B822E1 /* Sources */,
1585EA7A26984C4300B822E1 /* Frameworks */,
1585EA9626984E6F00B822E1 /* Copy Artifacts to Custom Build Dir */,
1585EA9626984E6F00B822E1 /* Copy Artefacts to Custom Build Dir */,
);
buildRules = (
);
dependencies = (
431ABA6427590FF100017E1B /* PBXTargetDependency */,
431ABA5227590FA900017E1B /* PBXTargetDependency */,
1585ECC4269C5A0800B822E1 /* PBXTargetDependency */,
1598060F26CFC2E000593C9D /* PBXTargetDependency */,
);
name = PEPObjCTypeUtils_macOS;
productName = PEPObjCTypeUtils;
@ -301,6 +315,8 @@
buildRules = (
);
dependencies = (
1585ED5A269C6B9F00B822E1 /* PBXTargetDependency */,
1598062F26CFCA8800593C9D /* PBXTargetDependency */,
);
name = PEPObjCTypeUtils_iOS;
productName = PEPObjCTypeUtils_iOS;
@ -357,12 +373,12 @@
projectDirPath = "";
projectReferences = (
{
ProductGroup = 431ABA3E27590F9E00017E1B /* Products */;
ProjectRef = 431ABA3D27590F9E00017E1B /* pEpEngine.xcodeproj */;
ProductGroup = 1585EC8A269C51EC00B822E1 /* Products */;
ProjectRef = 1585EACB269850B400B822E1 /* pEpEngine.xcodeproj */;
},
{
ProductGroup = 431ABA5527590FE700017E1B /* Products */;
ProjectRef = 431ABA5427590FE700017E1B /* PEPObjCTypes.xcodeproj */;
ProductGroup = 159805FB26CFC0C500593C9D /* Products */;
ProjectRef = 159805FA26CFC0C500593C9D /* PEPObjCTypes.xcodeproj */;
},
);
projectRoot = "";
@ -375,53 +391,53 @@
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
431ABA4C27590F9E00017E1B /* libpEpEngine.a */ = {
1585EC91269C51EC00B822E1 /* libpEpEngine.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libpEpEngine.a;
remoteRef = 431ABA4B27590F9E00017E1B /* PBXContainerItemProxy */;
remoteRef = 1585EC90269C51EC00B822E1 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
431ABA4E27590F9E00017E1B /* libpEpEngine_macOS.a */ = {
1585EC93269C51EC00B822E1 /* libpEpEngine_macOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libpEpEngine_macOS.a;
remoteRef = 431ABA4D27590F9E00017E1B /* PBXContainerItemProxy */;
remoteRef = 1585EC92269C51EC00B822E1 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
431ABA5027590F9E00017E1B /* pEpTrustWords.bundle */ = {
1585EC95269C51EC00B822E1 /* pEpTrustWords.bundle */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = pEpTrustWords.bundle;
remoteRef = 431ABA4F27590F9E00017E1B /* PBXContainerItemProxy */;
remoteRef = 1585EC94269C51EC00B822E1 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
431ABA5C27590FE700017E1B /* libPEPObjCTypes_macOS.a */ = {
1598060126CFC0C500593C9D /* libPEPObjCTypes_macOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libPEPObjCTypes_macOS.a;
remoteRef = 431ABA5B27590FE700017E1B /* PBXContainerItemProxy */;
remoteRef = 1598060026CFC0C500593C9D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
431ABA5E27590FE700017E1B /* libPEPObjCTypes_iOS.a */ = {
1598060326CFC0C500593C9D /* libPEPObjCTypes_iOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libPEPObjCTypes_iOS.a;
remoteRef = 431ABA5D27590FE700017E1B /* PBXContainerItemProxy */;
remoteRef = 1598060226CFC0C500593C9D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
431ABA6027590FE700017E1B /* PEPObjCTypesTests_iOS.xctest */ = {
1598060526CFC0C500593C9D /* PEPObjCTypesTests_iOS.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = PEPObjCTypesTests_iOS.xctest;
remoteRef = 431ABA5F27590FE700017E1B /* PBXContainerItemProxy */;
remoteRef = 1598060426CFC0C500593C9D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
431ABA6227590FE700017E1B /* PEPObjCTypesTests_macOS.xctest */ = {
4372DD9E2758CF61005A2997 /* PEPObjCTypesTests_macOS.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = PEPObjCTypesTests_macOS.xctest;
remoteRef = 431ABA6127590FE700017E1B /* PBXContainerItemProxy */;
remoteRef = 4372DD9D2758CF61005A2997 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
@ -437,7 +453,7 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
1585EA9626984E6F00B822E1 /* Copy Artifacts to Custom Build Dir */ = {
1585EA9626984E6F00B822E1 /* Copy Artefacts to Custom Build Dir */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@ -446,14 +462,14 @@
);
inputPaths = (
);
name = "Copy Artifacts to Custom Build Dir";
name = "Copy Artefacts to Custom Build Dir";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "CUSTOM_BUILD_DIR=${PROJECT_DIR}/build\nCUSTOM_INCLUDE_DIR=${CUSTOM_BUILD_DIR}/include\nmkdir -p ${CUSTOM_INCLUDE_DIR}\n\ncp \"${PROJECT_DIR}/../PublicHeaders\"/*.h \"${CUSTOM_INCLUDE_DIR}\"\ncp \"${BUILT_PRODUCTS_DIR}/libPEPObjCTypeUtils_macOS.a\" ${CUSTOM_BUILD_DIR}\n";
shellScript = "CUSTOM_BUILD_DIR=${PROJECT_DIR}/build\nCUSTOM_INCLUDE_DIR=${CUSTOM_BUILD_DIR}/include\nmkdir -p ${CUSTOM_INCLUDE_DIR}\n\ncp \"${PROJECT_DIR}/PEPObjCTypeUtils/PublicHeaders\"/*.h \"${CUSTOM_INCLUDE_DIR}\"\ncp \"${BUILT_PRODUCTS_DIR}/libPEPObjCTypeUtils_macOS.a\" ${CUSTOM_BUILD_DIR}\n";
showEnvVarsInLog = 0;
};
1585EC78269C3DD000B822E1 /* Copy Artefacts to Custom Build dir */ = {
@ -508,15 +524,25 @@
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
431ABA5227590FA900017E1B /* PBXTargetDependency */ = {
1585ECC4269C5A0800B822E1 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = pEpEngine_macOS;
targetProxy = 431ABA5127590FA900017E1B /* PBXContainerItemProxy */;
targetProxy = 1585ECC3269C5A0800B822E1 /* PBXContainerItemProxy */;
};
1585ED5A269C6B9F00B822E1 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = pEpEngine;
targetProxy = 1585ED59269C6B9F00B822E1 /* PBXContainerItemProxy */;
};
431ABA6427590FF100017E1B /* PBXTargetDependency */ = {
1598060F26CFC2E000593C9D /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = PEPObjCTypes_macOS;
targetProxy = 431ABA6327590FF100017E1B /* PBXContainerItemProxy */;
targetProxy = 1598060E26CFC2E000593C9D /* PBXContainerItemProxy */;
};
1598062F26CFCA8800593C9D /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = PEPObjCTypes_iOS;
targetProxy = 1598062E26CFCA8800593C9D /* PBXContainerItemProxy */;
};
43B0EAD7274D21E100F5D076 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
@ -578,10 +604,10 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
"${PROJECT_DIR}/../../../../pEpEngine/build-mac/build/include/",
"${PROJECT_DIR}/../../../../pEpEngine/build-mac/build/include/pEp",
"${PROJECT_DIR}/../../PEPObjCTypes/build-mac/build/include",
"${PROJECT_DIR}/../../../../libpEpTransport/build-mac/build/include",
"${PROJECT_DIR}/../../../pEpEngine/build-mac/build/include/",
"${PROJECT_DIR}/../../../pEpEngine/build-mac/build/include/pEp",
"${PROJECT_DIR}/../PEPObjCTypes/build/include",
"${PROJECT_DIR}/../../../libpEpTransport/build-mac/build/include",
);
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MACOSX_DEPLOYMENT_TARGET = 10.10;
@ -642,10 +668,10 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
"${PROJECT_DIR}/../../../../pEpEngine/build-mac/build/include/",
"${PROJECT_DIR}/../../../../pEpEngine/build-mac/build/include/pEp",
"${PROJECT_DIR}/../../PEPObjCTypes/build-mac/build/include",
"${PROJECT_DIR}/../../../../libpEpTransport/build-mac/build/include",
"${PROJECT_DIR}/../../../pEpEngine/build-mac/build/include/",
"${PROJECT_DIR}/../../../pEpEngine/build-mac/build/include/pEp",
"${PROJECT_DIR}/../PEPObjCTypes/build/include",
"${PROJECT_DIR}/../../../libpEpTransport/build-mac/build/include",
);
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MACOSX_DEPLOYMENT_TARGET = 10.10;


+ 5
- 7
Subprojects/PEPObjCTypeUtils/src/PEPMessage+ASN1.m View File

@ -7,14 +7,13 @@
#import "PEPMessage+ASN1.h"
#import "PEPObjCTypeUtils.h"
#import "map_asn1.h"
#import "message_codec.h"
#import "PEPObjCTypeConversionUtil.h"
#import <map_asn1.h>
#import <message_codec.h>
@implementation PEPMessage (ASN1)
+ (instancetype _Nullable)messageFromAsn1Data:(NSData *)asn1Data
{
+ (instancetype _Nullable)messageFromAsn1Data:(NSData *)asn1Data {
ASN1Message_t *asn1Message = NULL;
PEP_STATUS status = decode_ASN1Message_message(asn1Data.bytes, asn1Data.length, &asn1Message);
if (status != PEP_STATUS_OK) {
@ -32,8 +31,7 @@
return [PEPObjCTypeConversionUtil pEpMessagefromStruct:msg];
}
- (NSData *)asn1Data
{
- (NSData *)asn1Data {
message *msg = [PEPObjCTypeConversionUtil structFromPEPMessage:self];
ASN1Message_t *asn1Message = ASN1Message_from_message(msg, NULL, YES, 0);
free_message(msg);


+ 0
- 23
Subprojects/PEPObjCTypeUtils/src/PEPObjCTypeConversionUtil.m View File

@ -7,7 +7,6 @@
#import "PEPObjCTypeConversionUtil.h"
#import <PEPTransport.h>
#import <PEPAttachment.h>
#import <PEPMessage.h>
#import <PEPIdentity.h>
@ -16,28 +15,6 @@
@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


+ 0
- 2
Subprojects/PEPObjCTypes/PublicHeaders/PEPIdentity.h View File

@ -10,8 +10,6 @@
#import "PEPEngineTypes.h"
@class PEPSession;
@interface PEPIdentity : NSObject <NSMutableCopying, NSSecureCoding>
/**


+ 1
- 0
Subprojects/PEPObjCTypes/PublicHeaders/PEPObjCTypes.h View File

@ -14,6 +14,7 @@
#import "PEPAttachment.h"
#import "PEPIdentity.h"
#import "PEPErrors.h"
#import "PEPTransportConfig.h"
@interface PEPObjCTypes : NSObject


+ 0
- 17
Subprojects/PEPObjCTypes/PublicHeaders/PEPTransport.h View File

@ -1,17 +0,0 @@
//
// PEPTransport.h
//
// Created by Andreas Buff on 16.08.21.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/// Represents pEpEngine struct _PEP_transport_t
/// Intentinally unimplemented as currently unused (is meant to use when the Engine will do transport, offering some infos and callbacks to do the actual work)
@interface PEPTransport : NSObject
@end
NS_ASSUME_NONNULL_END

+ 1
- 2
Subprojects/PEPObjCTypes/PublicHeaders/PEPTransportConfig.h View File

@ -11,10 +11,9 @@ NS_ASSUME_NONNULL_BEGIN
@interface PEPTransportConfig : NSObject
@property (nonatomic) Size size;
@property (nonatomic) UInt16 port;
- (instancetype)initWithSize:(Size)size port:(UInt16)port;
- (instancetype)initWithPort:(UInt16)port;
@end


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

@ -1,44 +0,0 @@
#
# Dox: http://www.gnustep.org/resources/documentation/make_1.html
#
# To Run: `make messages=yes shared=no debug=yes`
#
# Include the common variables defined by the Makefile Package
include $(GNUSTEP_MAKEFILES)/common.make
LIBRARY_NAME = pEpObjCTypes
# 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})
# Keep. Useful to manually figure out flags for precompiled header.
#pEpObjCTypes_OBJC_PRECOMPILED_HEADERS = PEPObjCGNUStepOptimizations.h
# Finds all dirs in src and prefixes with "-I"
ALL_PRIVATE_HEADER_DIRS_PREFIXED := $(shell find ../src/ -type d | sed -e 's/^/-I/;')
pEpObjCTypes_INCLUDE_DIRS = -I../PublicHeaders/ ${ALL_PRIVATE_HEADER_DIRS_PREFIXED}
ALL_DOT_M_FILES := $(shell find ../src/ -type f | grep .m)
pEpObjCTypes_OBJC_FILES = ${ALL_DOT_M_FILES}
pEpObjCTypes_RESOURCE_FILES =
ADDITIONAL_OBJCFLAGS += -include-pch PEPObjCGNUStepOptimizations.h.gch -Winvalid-pch
ADDITIONAL_OBJC_LIBS = -ldispatch
ADDITIONAL_FLAGS = -fobjc-runtime=gnustep-2.0 -fobjc-arc -fPIC
HEADER_FILES_INSTALL_DIR = build
# For lib
include $(GNUSTEP_MAKEFILES)/library.make
# Copy Artefacts
SHELL_RESULT := $(shell mkdir -p build)
SHELL_RESULT := $(shell cp obj/*.a build/)

+ 20
- 0
Subprojects/PEPObjCTypes/build-linux/Makefile View File

@ -0,0 +1,20 @@
# Content of this library
TARGET = libPEPObjCTypes
OBJECTS = $(call find-objects,../src)
DEPFILES = $(call find-deps,../src)
HEADERS = $(call find-headers,../PublicHeaders/)
# Dependencies *within* this repo (other headers should be installed and found in $PREFIX).
INCLUDES = \
-I../PublicHeaders \
$(call find-includes,..)
# Only for making .so libs. Libs for static linking are defined with the final binary.
LIBS =
# Load the shared pEp ObjC Makefile.
MAKEFILE_COMMON ?= ../../../../../pepgnustephelper/
include $(MAKEFILE_COMMON)/Makefile.common
# This enables proper header-dependencies based on .d files made by the compiler.
include $(DEPFILES)

+ 65
- 33
Subprojects/PEPObjCTypes/build-mac/PEPObjCTypes.xcodeproj/project.pbxproj View File

@ -9,12 +9,8 @@
/* Begin PBXBuildFile section */
1598061A26CFC5D800593C9D /* PEPObjCTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E575841268328CD0084F02D /* PEPObjCTypes.h */; settings = {ATTRIBUTES = (Public, ); }; };
1598061B26CFC5D900593C9D /* PEPObjCTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E575841268328CD0084F02D /* PEPObjCTypes.h */; settings = {ATTRIBUTES = (Public, ); }; };
1598067426CFE9B100593C9D /* PEPTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = 1598067226CFE9B100593C9D /* PEPTransport.h */; settings = {ATTRIBUTES = (Public, ); }; };
1598067526CFE9B100593C9D /* PEPTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = 1598067226CFE9B100593C9D /* PEPTransport.h */; settings = {ATTRIBUTES = (Public, ); }; };
1598067626CFE9B100593C9D /* PEPTransportConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 1598067326CFE9B100593C9D /* PEPTransportConfig.h */; settings = {ATTRIBUTES = (Public, ); }; };
1598067726CFE9B100593C9D /* PEPTransportConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 1598067326CFE9B100593C9D /* PEPTransportConfig.h */; settings = {ATTRIBUTES = (Public, ); }; };
1598067A26CFE9CF00593C9D /* PEPTransport.m in Sources */ = {isa = PBXBuildFile; fileRef = 1598067826CFE9CF00593C9D /* PEPTransport.m */; };
1598067B26CFE9CF00593C9D /* PEPTransport.m in Sources */ = {isa = PBXBuildFile; fileRef = 1598067826CFE9CF00593C9D /* PEPTransport.m */; };
1598067C26CFE9CF00593C9D /* PEPTransportConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 1598067926CFE9CF00593C9D /* PEPTransportConfig.m */; };
1598067D26CFE9CF00593C9D /* PEPTransportConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 1598067926CFE9CF00593C9D /* PEPTransportConfig.m */; };
15BD2F9A27342A2400B1B1F5 /* PEPEqualableTools.h in Headers */ = {isa = PBXBuildFile; fileRef = 15BD2F9827342A2400B1B1F5 /* PEPEqualableTools.h */; };
@ -32,7 +28,7 @@
439F4C43275632E2005F278E /* PEPLanguage+SecureCodingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E5758CC26833F920084F02D /* PEPLanguage+SecureCodingTest.m */; };
439F4C44275632E6005F278E /* PEPMessage+SecureCodingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E5758CD26833F920084F02D /* PEPMessage+SecureCodingTest.m */; };
43D44C822685BB3600638D1C /* PEPObjCTypes_iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E575867268329A20084F02D /* PEPObjCTypes_iOS.h */; platformFilter = ios; settings = {ATTRIBUTES = (Public, ); }; };
43D44C842685BEB400638D1C /* module.modulemap in CopyFiles */ = {isa = PBXBuildFile; fileRef = 43D44C832685BE4300638D1C /* module.modulemap */; platformFilter = ios; };
43D44C842685BEB400638D1C /* pEpObjCTypesModuleMap.modulemap in CopyFiles */ = {isa = PBXBuildFile; fileRef = 43D44C832685BE4300638D1C /* pEpObjCTypesModuleMap.modulemap */; platformFilter = ios; };
4E57585B268329170084F02D /* PEPObjCTypes_macOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E57585A268329170084F02D /* PEPObjCTypes_macOS.h */; };
4E57585D268329170084F02D /* PEPObjCTypes_macOS.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E57585C268329170084F02D /* PEPObjCTypes_macOS.m */; };
4E575869268329A20084F02D /* PEPObjCTypes_iOS.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E575868268329A20084F02D /* PEPObjCTypes_iOS.m */; platformFilter = ios; };
@ -58,7 +54,7 @@
4E5758AE2683331C0084F02D /* PEPTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E57588126832F2F0084F02D /* PEPTypes.h */; platformFilter = ios; settings = {ATTRIBUTES = (Public, ); }; };
4E5758B02683331C0084F02D /* PEPLanguage.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E57588226832F2F0084F02D /* PEPLanguage.h */; platformFilter = ios; settings = {ATTRIBUTES = (Public, ); }; };
4E5758B626833A4E0084F02D /* PEPObjCTypes_macOS.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4E57585A268329170084F02D /* PEPObjCTypes_macOS.h */; };
4E5758B726833A560084F02D /* module.modulemap in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4E5758B4268339450084F02D /* module.modulemap */; };
4E5758B726833A560084F02D /* pEpObjCTypesModuleMap.modulemap in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4E5758B4268339450084F02D /* pEpObjCTypesModuleMap.modulemap */; };
4E5758C426833D140084F02D /* libPEPObjCTypes_iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4E575865268329A20084F02D /* libPEPObjCTypes_iOS.a */; platformFilter = ios; };
4E5758D126833F920084F02D /* PEPAttachment+SecureCodingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E5758CA26833F920084F02D /* PEPAttachment+SecureCodingTest.m */; };
4E5758D226833F920084F02D /* PEPIdentity+SecureCodingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E5758CB26833F920084F02D /* PEPIdentity+SecureCodingTest.m */; };
@ -91,7 +87,7 @@
dstPath = "include/$(PRODUCT_NAME)";
dstSubfolderSpec = 16;
files = (
43D44C842685BEB400638D1C /* module.modulemap in CopyFiles */,
43D44C842685BEB400638D1C /* pEpObjCTypesModuleMap.modulemap in CopyFiles */,
4E57586A268329A20084F02D /* PEPObjCTypes_iOS.h in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
@ -102,7 +98,7 @@
dstPath = "include/$(PRODUCT_NAME)";
dstSubfolderSpec = 16;
files = (
4E5758B726833A560084F02D /* module.modulemap in CopyFiles */,
4E5758B726833A560084F02D /* pEpObjCTypesModuleMap.modulemap in CopyFiles */,
4E5758B626833A4E0084F02D /* PEPObjCTypes_macOS.h in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
@ -110,16 +106,14 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
1598067226CFE9B100593C9D /* PEPTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PEPTransport.h; sourceTree = "<group>"; };
1598067326CFE9B100593C9D /* PEPTransportConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PEPTransportConfig.h; sourceTree = "<group>"; };
1598067826CFE9CF00593C9D /* PEPTransport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PEPTransport.m; sourceTree = "<group>"; };
1598067926CFE9CF00593C9D /* PEPTransportConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PEPTransportConfig.m; sourceTree = "<group>"; };
15BD2F9827342A2400B1B1F5 /* PEPEqualableTools.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PEPEqualableTools.h; sourceTree = "<group>"; };
15BD2F9927342A2400B1B1F5 /* PEPEqualableTools.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PEPEqualableTools.m; sourceTree = "<group>"; };
15BD319A2742A1B500B1B1F5 /* PEPErrors.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PEPErrors.h; sourceTree = "<group>"; };
15BD319B2742A1B500B1B1F5 /* PEPErrors.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PEPErrors.m; sourceTree = "<group>"; };
439F4C36275632B2005F278E /* PEPObjCTypesTests_macOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PEPObjCTypesTests_macOS.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
43D44C832685BE4300638D1C /* module.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = "<group>"; };
43D44C832685BE4300638D1C /* pEpObjCTypesModuleMap.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = pEpObjCTypesModuleMap.modulemap; sourceTree = "<group>"; };
4E575841268328CD0084F02D /* PEPObjCTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PEPObjCTypes.h; sourceTree = "<group>"; };
4E575858268329170084F02D /* libPEPObjCTypes_macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPEPObjCTypes_macOS.a; sourceTree = BUILT_PRODUCTS_DIR; };
4E57585A268329170084F02D /* PEPObjCTypes_macOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PEPObjCTypes_macOS.h; sourceTree = "<group>"; };
@ -137,7 +131,7 @@
4E57588326832F2F0084F02D /* PEPMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PEPMessage.h; sourceTree = "<group>"; };
4E57588426832F2F0084F02D /* PEPAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PEPAttachment.h; sourceTree = "<group>"; };
4E57588626832F2F0084F02D /* PEPIdentity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PEPIdentity.h; sourceTree = "<group>"; };
4E5758B4268339450084F02D /* module.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = "<group>"; };
4E5758B4268339450084F02D /* pEpObjCTypesModuleMap.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = pEpObjCTypesModuleMap.modulemap; sourceTree = "<group>"; };
4E5758B926833A700084F02D /* libpEpEngine_macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libpEpEngine_macOS.a; sourceTree = BUILT_PRODUCTS_DIR; };
4E5758BF26833D140084F02D /* PEPObjCTypesTests_iOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PEPObjCTypesTests_iOS.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
4E5758C326833D140084F02D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@ -195,11 +189,10 @@
4E575835268328CD0084F02D = {
isa = PBXGroup;
children = (
4E57587E26832F2F0084F02D /* PublicHeaders */,
4E57587326832F2F0084F02D /* src */,
4E575840268328CD0084F02D /* PEPObjCTypes */,
4E575859268329170084F02D /* PEPObjCTypes_macOS */,
4E575866268329A20084F02D /* PEPObjCTypes_iOS */,
4E5758C026833D140084F02D /* PEPObjCTypesTests */,
4E5758C026833D140084F02D /* PEPObjCTypesTests_iOS */,
4E57583F268328CD0084F02D /* Products */,
4E5758B826833A700084F02D /* Frameworks */,
);
@ -216,12 +209,21 @@
name = Products;
sourceTree = "<group>";
};
4E575840268328CD0084F02D /* PEPObjCTypes */ = {
isa = PBXGroup;
children = (
4E57587E26832F2F0084F02D /* PublicHeaders */,
4E57587326832F2F0084F02D /* src */,
);
path = PEPObjCTypes;
sourceTree = "<group>";
};
4E575859268329170084F02D /* PEPObjCTypes_macOS */ = {
isa = PBXGroup;
children = (
4E57585A268329170084F02D /* PEPObjCTypes_macOS.h */,
4E57585C268329170084F02D /* PEPObjCTypes_macOS.m */,
4E5758B4268339450084F02D /* module.modulemap */,
4E5758B4268339450084F02D /* pEpObjCTypesModuleMap.modulemap */,
);
path = PEPObjCTypes_macOS;
sourceTree = "<group>";
@ -231,7 +233,7 @@
children = (
4E575867268329A20084F02D /* PEPObjCTypes_iOS.h */,
4E575868268329A20084F02D /* PEPObjCTypes_iOS.m */,
43D44C832685BE4300638D1C /* module.modulemap */,
43D44C832685BE4300638D1C /* pEpObjCTypesModuleMap.modulemap */,
);
path = PEPObjCTypes_iOS;
sourceTree = "<group>";
@ -239,7 +241,6 @@
4E57587326832F2F0084F02D /* src */ = {
isa = PBXGroup;
children = (
1598067826CFE9CF00593C9D /* PEPTransport.m */,
1598067926CFE9CF00593C9D /* PEPTransportConfig.m */,
4E57587826832F2F0084F02D /* PEPAttachment.m */,
4E57587526832F2F0084F02D /* PEPIdentity.m */,
@ -248,15 +249,13 @@
15BD319B2742A1B500B1B1F5 /* PEPErrors.m */,
15BD2F9E27342A3500B1B1F5 /* PEPEqualableTools */,
);
name = src;
path = ../src;
path = src;
sourceTree = "<group>";
};
4E57587E26832F2F0084F02D /* PublicHeaders */ = {
isa = PBXGroup;
children = (
4E575841268328CD0084F02D /* PEPObjCTypes.h */,
1598067226CFE9B100593C9D /* PEPTransport.h */,
1598067326CFE9B100593C9D /* PEPTransportConfig.h */,
4E57587F26832F2F0084F02D /* PEPEngineTypes.h */,
4E57588126832F2F0084F02D /* PEPTypes.h */,
@ -266,8 +265,7 @@
4E57588626832F2F0084F02D /* PEPIdentity.h */,
15BD319A2742A1B500B1B1F5 /* PEPErrors.h */,
);
name = PublicHeaders;
path = ../PublicHeaders;
path = PublicHeaders;
sourceTree = "<group>";
};
4E5758B826833A700084F02D /* Frameworks */ = {
@ -278,7 +276,7 @@
name = Frameworks;
sourceTree = "<group>";
};
4E5758C026833D140084F02D /* PEPObjCTypesTests */ = {
4E5758C026833D140084F02D /* PEPObjCTypesTests_iOS */ = {
isa = PBXGroup;
children = (
4E5758CE26833F920084F02D /* TestUtils */,
@ -288,7 +286,7 @@
4E5758CD26833F920084F02D /* PEPMessage+SecureCodingTest.m */,
4E5758C326833D140084F02D /* Info.plist */,
);
path = PEPObjCTypesTests;
path = PEPObjCTypesTests_iOS;
sourceTree = "<group>";
};
4E5758CE26833F920084F02D /* TestUtils */ = {
@ -312,7 +310,6 @@
4E5758A026832F2F0084F02D /* PEPMessage.h in Headers */,
15BD319C2742A1B500B1B1F5 /* PEPErrors.h in Headers */,
1598061B26CFC5D900593C9D /* PEPObjCTypes.h in Headers */,
1598067426CFE9B100593C9D /* PEPTransport.h in Headers */,
4E5758A126832F2F0084F02D /* PEPAttachment.h in Headers */,
4E57589C26832F2F0084F02D /* PEPEngineTypes.h in Headers */,
4E57585B268329170084F02D /* PEPObjCTypes_macOS.h in Headers */,
@ -330,7 +327,6 @@
4E5758AC2683331C0084F02D /* PEPIdentity.h in Headers */,
1598061A26CFC5D800593C9D /* PEPObjCTypes.h in Headers */,
15BD319D2742A1B500B1B1F5 /* PEPErrors.h in Headers */,
1598067526CFE9B100593C9D /* PEPTransport.h in Headers */,
4E5758AE2683331C0084F02D /* PEPTypes.h in Headers */,
4E5758B02683331C0084F02D /* PEPLanguage.h in Headers */,
4E5758A82683331C0084F02D /* PEPEngineTypes.h in Headers */,
@ -370,7 +366,8 @@
4E575855268329170084F02D /* Sources */,
4E575856268329170084F02D /* Frameworks */,
4E5758B526833A120084F02D /* CopyFiles */,
4E5758F7268371770084F02D /* Copy artifacts to custom build dir */,
15A9C9322760D85F00307D3F /* Rename Module Map File - Workaround for "duplicate module definition" - IOS-2879 */,
4E5758F7268371770084F02D /* Copy artefacts to custom build dir */,
);
buildRules = (
);
@ -389,6 +386,7 @@
4E575861268329A20084F02D /* Sources */,
4E575862268329A20084F02D /* Frameworks */,
4E575863268329A20084F02D /* CopyFiles */,
15A9C9332760D86500307D3F /* Rename Module Map File - Workaround for "duplicate module definition" - IOS-2879 */,
4E5758F8268371B10084F02D /* Copy artefacts to custom build dir */,
);
buildRules = (
@ -479,7 +477,43 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
4E5758F7268371770084F02D /* Copy artifacts to custom build dir */ = {
15A9C9322760D85F00307D3F /* Rename Module Map File - Workaround for "duplicate module definition" - IOS-2879 */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Rename Module Map File - Workaround for \"duplicate module definition\" - IOS-2879";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "BUILD_INCLUDE_DIR=\"${BUILT_PRODUCTS_DIR}/include/PEPObjCTypes_macOS\"\nmv ${BUILD_INCLUDE_DIR}/pEpObjCTypesModuleMap.modulemap ${BUILD_INCLUDE_DIR}/module.modulemap\n";
};
15A9C9332760D86500307D3F /* Rename Module Map File - Workaround for "duplicate module definition" - IOS-2879 */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Rename Module Map File - Workaround for \"duplicate module definition\" - IOS-2879";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "BUILD_INCLUDE_DIR=\"${BUILT_PRODUCTS_DIR}/include/PEPObjCTypes_iOS\"\nmv ${BUILD_INCLUDE_DIR}/pEpObjCTypesModuleMap.modulemap ${BUILD_INCLUDE_DIR}/module.modulemap\n";
};
4E5758F7268371770084F02D /* Copy artefacts to custom build dir */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@ -488,14 +522,14 @@
);
inputPaths = (
);
name = "Copy artifacts to custom build dir";
name = "Copy artefacts to custom build dir";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "CUSTOM_BUILD_DIR=${PROJECT_DIR}/build\nmkdir -p ${CUSTOM_BUILD_DIR}\nCUSTOM_INCLUDE_DIR=${PROJECT_DIR}/build/include\nmkdir -p ${CUSTOM_INCLUDE_DIR}\n\ncp \"${PROJECT_DIR}/../PublicHeaders\"/* ${CUSTOM_INCLUDE_DIR}\ncp \"${BUILT_PRODUCTS_DIR}/libPEPObjCTypes_macOS.a\" ${CUSTOM_BUILD_DIR}\n";
shellScript = "CUSTOM_BUILD_DIR=${PROJECT_DIR}/build\nmkdir -p ${CUSTOM_BUILD_DIR}\nCUSTOM_INCLUDE_DIR=${PROJECT_DIR}/build/include\nmkdir -p ${CUSTOM_INCLUDE_DIR}\n\ncp \"${PROJECT_DIR}/PEPObjCTypes/PublicHeaders\"/* ${CUSTOM_INCLUDE_DIR}\ncp \"${PROJECT_DIR}/../../../libpEpTransport/build-mac/build/include/pEp/PEPTransportStatusCode.h\" ${CUSTOM_INCLUDE_DIR}\ncp \"${BUILT_PRODUCTS_DIR}/libPEPObjCTypes_macOS.a\" ${CUSTOM_BUILD_DIR}\n";
};
4E5758F8268371B10084F02D /* Copy artefacts to custom build dir */ = {
isa = PBXShellScriptBuildPhase;
@ -538,7 +572,6 @@
4E57589626832F2F0084F02D /* PEPLanguage.m in Sources */,
4E57589026832F2F0084F02D /* PEPAttachment.m in Sources */,
4E57588B26832F2F0084F02D /* PEPIdentity.m in Sources */,
1598067A26CFE9CF00593C9D /* PEPTransport.m in Sources */,
1598067C26CFE9CF00593C9D /* PEPTransportConfig.m in Sources */,
4E57585D268329170084F02D /* PEPObjCTypes_macOS.m in Sources */,
4E57589A26832F2F0084F02D /* PEPMessage.m in Sources */,
@ -554,7 +587,6 @@
4E57589726832F2F0084F02D /* PEPLanguage.m in Sources */,
4E57589126832F2F0084F02D /* PEPAttachment.m in Sources */,
4E57588C26832F2F0084F02D /* PEPIdentity.m in Sources */,
1598067B26CFE9CF00593C9D /* PEPTransport.m in Sources */,
1598067D26CFE9CF00593C9D /* PEPTransportConfig.m in Sources */,
4E575869268329A20084F02D /* PEPObjCTypes_iOS.m in Sources */,
4E57589B26832F2F0084F02D /* PEPMessage.m in Sources */,


Subprojects/PEPObjCTypes/build-mac/PEPObjCTypes_iOS/module.modulemap → Subprojects/PEPObjCTypes/build-mac/PEPObjCTypes_iOS/pEpObjCTypesModuleMap.modulemap View File


Subprojects/PEPObjCTypes/build-mac/PEPObjCTypes_macOS/module.modulemap → Subprojects/PEPObjCTypes/build-mac/PEPObjCTypes_macOS/pEpObjCTypesModuleMap.modulemap View File


+ 0
- 20
Subprojects/PEPObjCTypes/src/PEPTransport.m View File

@ -1,20 +0,0 @@
//
// PEPTransport.m
//
// Created by Andreas Buff on 16.08.21.
//
#import "PEPTransport.h"
@implementation PEPTransport
// Intentionally unimplemented. See info in header
- (instancetype)init
{
self = [super init];
if (self) {
NSAssert(false, @"unimplemented stub");
}
return self;
}
@end

+ 1
- 2
Subprojects/PEPObjCTypes/src/PEPTransportConfig.m View File

@ -9,11 +9,10 @@
@implementation PEPTransportConfig
- (instancetype)initWithSize:(Size)size port:(UInt16)port
- (instancetype)initWithPort:(UInt16)port
{
self = [super init];
if (self) {
_size = size;
_port = port;
}
return self;


+ 0
- 57
build-linux/GNUmakefile View File

@ -1,57 +0,0 @@
#
# Dox: http://www.gnustep.org/resources/documentation/make_1.html
#
# To Run: `make messages=yes shared=no debug=yes
#
# Include the common variables defined by the Makefile Package
include $(GNUSTEP_MAKEFILES)/common.make
# Build Dependencies
SHELL_RESULT := $(shell ./build-dependencies.sh)
LIBRARY_NAME = pEpObjCAdapter
# Build pre-compiled prefix header
GNUSTEPHELPER_DIR=../../../pepgnustephelper
FLAGS_FOR_PRECOMPILED_HEADER_DEBUG="-pthread -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="-pthread -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})
# Keep. Useful to manually figure out flags for precompiled header.
# pEpObjCAdapter_OBJC_PRECOMPILED_HEADERS = PEPObjCGNUStepOptimizations.h
# Header Search Paths
#Finds all dirs containing headers and prefixes with "-I"
ALL_LOCAL_INCLUDE_HEADER_DIRS_PREFIXED := $(shell find ~/local/include/ -type d | sed -e 's/^/-I/;')
PEP_OBJC_TYPES_HEADER_DIRS_PREFIXED := -I../../Subprojects/PEPObjCTypes/PEPObjCTypes/PublicHeaders/
PEP_OBJC_TYPE_UTILS_HEADER_DIRS_PREFIXED := -I../../Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PublicHeaders/
PEP_OBJC_ADAPTER_PROTOCOLS_HEADER_DIRS_PREFIXED := -I../../Subprojects/PEPObjCAdapterProtocols/PEPObjCAdapterProtocols/PublicHeaders/
PEP_OBJC_ADAPTER_HEADER_DIRS_PREFIXED := $(shell find ../../pEpObjCAdapter/ -type d | sed -e 's/^/-I/;')
pEpObjCAdapter_INCLUDE_DIRS = ${PEP_OBJC_ADAPTER_HEADER_DIRS_PREFIXED} ${ALL_LOCAL_INCLUDE_HEADER_DIRS_PREFIXED} ${PEP_OBJC_TYPES_HEADER_DIRS_PREFIXED} ${PEP_OBJC_TYPE_UTILS_HEADER_DIRS_PREFIXED} ${PEP_OBJC_ADAPTER_PROTOCOLS_HEADER_DIRS_PREFIXED}
# SRC Files
ALL_DOT_M_FILES := $(shell find ../ -type f -name "*.m")
pEpObjCAdapter_OBJC_FILES = ${ALL_DOT_M_FILES}
pEpObjCAdapter_RESOURCE_FILES =
# Build Settings
pEpObjCAdapter_LDFLAGS = ../../Subprojects/PEPObjCTypes/PEPObjCTypes/build-linux/build/libpEpObjCTypes.a ../../Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/build-linux/build/libpEpObjCTypeUtils.a ../../Subprojects/PEPObjCAdapterProtocols/PEPObjCAdapterProtocols/build-linux/build/libpEpObjCAdapterProtocols.a
ADDITIONAL_OBJCFLAGS += -include-pch PEPObjCGNUStepOptimizations.h.gch -Winvalid-pch
ADDITIONAL_OBJC_LIBS = -ldispatch
ADDITIONAL_FLAGS = -fobjc-runtime=gnustep-2.0 -fobjc-arc -fPIC -g -O0
HEADER_FILES_INSTALL_DIR = build
# For lib
include $(GNUSTEP_MAKEFILES)/library.make
# Copy Artefacts
SHELL_RESULT := $(shell mkdir -p build)
SHELL_RESULT := $(shell cp obj/*.a build/)

+ 27
- 0
build-linux/Makefile View File

@ -0,0 +1,27 @@
root = ../../
# Content of this library
TARGET = libpEpObjCAdapter
OBJECTS = $(patsubst %.m,%.o,$(wildcard ../*.m ../*/*.m))
DEPFILES = $(call find-deps,..)
HEADERS = $(call find-headers,../PublicHeaders/)
# Dependencies *within* this repo (other headers should be installed and found in $PREFIX).
INCLUDES = \
-I$(root)/pEpObjCAdapter/PublicHeaders \
-I$(root)/pEpObjCAdapter/Extensions \
-I$(root)/pEpObjCAdapter \
-I$(root)/Subprojects/PEPObjCAdapterProtocols/PEPObjCAdapterProtocols/PublicHeaders \
-I$(root)/Subprojects/PEPObjCTypes/PEPObjCTypes/PublicHeaders \
-I$(root)/Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PublicHeaders \
-I$(PEP_INCLUDE)
# Only for making .so libs. Libs for static linking are defined with the final binary.
LIBS = -lpEpEngine -Wl,--whole-archive -lPEPObjCTypes -lPEPObjCTypeUtils -lPEPObjCAdapterProtocols -Wl,--no-whole-archive
# Load the shared pEp ObjC Makefile.
MAKEFILE_COMMON ?= ../../../pepgnustephelper/
include $(MAKEFILE_COMMON)/Makefile.common
# This enables proper header-dependencies based on .d files made by the compiler.
include $(DEPFILES)

+ 0
- 72
build-linux/test_project/GNUmakefile View File

@ -1,72 +0,0 @@
#
# An example GNUmakefile
#
# To Run: `make messages=yes
# Include the common variables defined by the Makefile Package
include $(GNUSTEP_MAKEFILES)/common.make
#include $(GNUSTEP_MAKEFILES)/rules.make
#######################################
# Sampel Excecutable Using PEPObjCAdapter
#######################################
# Build Dependencies
SHELL_RESULT := $(shell ./build-dependencies.sh)
TOOL_NAME = ClientOfObjcAdapter
# Build pre-compiled prefix header
GNUSTEPHELPER_DIR=../../../../pepgnustephelper
FLAGS_FOR_PRECOMPILED_HEADER_DEBUG="-pthread -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="-pthread -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})
# Keep. Useful to manually figure out flags for precompiled header.
#pEpObjCAdapter_OBJC_PRECOMPILED_HEADERS = ${GNUSTEPHELPER_DIR}/PEPObjCGNUStepOptimizations.h
# Header Search Paths
PEP_OBJC_TYPES_HEADER_DIRS_PREFIXED := -I../../../Subprojects/PEPObjCTypes/PEPObjCTypes/PublicHeaders/
PEP_OBJC_TYPE_UTILS_HEADER_DIRS_PREFIXED := -I../../../Subprojects/PEPObjCTypeUtils/PEPObjCTypeUtils/PublicHeaders/
PEP_OBJC_ADAPTER_PROTOCOLS_HEADER_DIRS_PREFIXED := -I../../../Subprojects/PEPObjCAdapterProtocols/PEPObjCAdapterProtocols/PublicHeaders/
PEP_OBJC_ADAPTER_HEADER_DIRS_PREFIXED := $(shell find ../../../pEpObjCAdapter/ -type d | sed -e 's/^/-I/;')
CLIENT_OF_OBJC_ADAPTER_HEADER_DIRS_PREFIXED := $(shell find ../ -type d | sed -e 's/^/-I/;')
ClientOfObjcAdapter_INCLUDE_DIRS = ${CLIENT_OF_OBJC_ADAPTER_HEADER_DIRS_PREFIXED} ${PEP_OBJC_TYPES_HEADER_DIRS_PREFIXED} ${PEP_OBJC_TYPE_UTILS_HEADER_DIRS_PREFIXED} ${PEP_OBJC_ADAPTER_PROTOCOLS_HEADER_DIRS_PREFIXED} ${PEP_OBJC_ADAPTER_HEADER_DIRS_PREFIXED}
# SRC Files
ALL_DOT_M_FILES := $(shell find . -type f -name "*.m")
ClientOfObjcAdapter_OBJC_FILES = main.m
ClientOfObjcAdapter_RESOURCE_FILES =
ADDITIONAL_OBJCFLAGS += -include-pch PEPObjCGNUStepOptimizations.h.gch -Winvalid-pch
ADDITIONAL_FLAGS += -fobjc-runtime=gnustep-2.0 -fobjc-arc
## Linking Libs - Take Care !! The Order *DOES* Matter
ADDITIONAL_OBJC_LIBS = -ldispatch \
-l/usr/GNUstep/Local/Library/Libraries/libpEpObjCAdapter.so \
-l/usr/GNUstep/Local/Library/Libraries/libpEpObjCAdapterProtocols.a \
-l/usr/GNUstep/Local/Library/Libraries/libpEpObjCTypeUtils.a\
-l/usr/GNUstep/Local/Library/Libraries/libpEpObjCTypes.a \
-l${HOME}/local/lib/libpEpEngine.a \
-luuid \
-lz \
-l${HOME}/local/lib/libetpan.a \
-l${HOME}/local/lib/libasn1.a \
-l${HOME}/local/lib/libsqlite3.a \
-lpthread \
-ldl \
-l${HOME}/local/lib/libsequoia_openpgp_ffi.a \
-l${HOME}/local/lib/libhogweed.a \
-l${HOME}/local/lib/libnettle.a \
-l${HOME}/local/lib/libgmp.a
# -l/usr/GNUstep/Local/Library/Libraries/libpEpObjCAdapter.a\
ADDITIONAL_LDFLAGS += -L/usr/GNUstep/Local/Library/Libraries
include $(GNUSTEP_MAKEFILES)/tool.make

+ 39
- 0
build-linux/test_project/Makefile View File

@ -0,0 +1,39 @@
root = ../../../
# Content of this library
TARGET_EXE = test_project
OBJECTS = $(call find-objects,.)
DEPFILES = $(call find-deps,.)
HEADERS =
# Dependencies *within* this repo (other headers should be installed and found in $PREFIX).
INCLUDES = \
-I$(root)/pEpObjCAdapter/PublicHeaders
# Since we link an excecuatble here, these options matter a lot. We also need
# to list all transitive dependincies if we want to link statically.
# ObjC stuff needs to be linked with --whole-archive to mae Extensions work.
# Otherwise, we link "our" dependencies with -Bstatic to perfer static linking,
# but allow dynamic linking in the end for system stuff.
LIBS = \
-Wl,-Bstatic \
-Wl,--whole-archive \
-lpEpObjCAdapter \
-lPEPObjCTypes \
-lPEPObjCTypeUtils \
-lPEPObjCAdapterProtocols \
-Wl,--no-whole-archive \
-lpEpEngine -lasn1 -lsqlite3 -letpan -liconv -luuid \
-lsequoia_openpgp_ffi -lhogweed -lnettle -lgmp -lbz2 \
-Wl,-Bdynamic \
-ldl # dlsym is needed by some rust thing in sequoia.
# Default rule, to build the executable instead of libraries.
all: $(TARGET_EXE)
# Load the shared pEp ObjC Makefile.
MAKEFILE_COMMON ?= ../../../../pepgnustephelper/
include $(MAKEFILE_COMMON)/Makefile.common
# This enables proper header-dependencies based on .d files made by the compiler.
include $(DEPFILES)

+ 37
- 6
src/PEPObjCAdapter.m View File

@ -121,18 +121,24 @@ static id<PEPPassphraseProviderProtocol> s_passphraseProvider = nil;
}
+ (void)setupPerUserDirectory {
// The Engine uses the home env as per-user-directory. We hijack that on iOS,
// The Engine uses the HOME env as per-user-directory. We hijack that on iOS,
// or when running XCTests on macOS.
#if TARGET_OS_MAC
#if TARGET_OS_IPHONE
s_homeURL = [self createApplicationDirectory];
setenv("HOME", [[s_homeURL path] cStringUsingEncoding:NSUTF8StringEncoding], 1);
#else
if ([self isXCTestRunning]) {
return;
#elif TARGET_OS_OSX
if ([self isXCTestRunning] || [self isRunningInDevelopmentEnvironment]) {
s_homeURL = [self createTestDataDirectoryMacOS];
setenv("HOME", [[s_homeURL path] cStringUsingEncoding:NSUTF8StringEncoding], 1);
} else {
// For macOS there is nothing toDo. The defaults in Engine platform_unix.h should do.
}
return;
#endif
#else
// Neither macOS nor iOS. The engine will use $HOME.
#endif
}
@ -272,6 +278,9 @@ static id<PEPPassphraseProviderProtocol> s_passphraseProvider = nil;
/// Determines whether the adapter is running under a XCTest.
///
/// Uses `NSClassFromString`, `[NSObject valueForKey]` and `[NSProcessInfo processInfo]` and should therefore
/// compile on most GNUstep platforms an macOS.
///
/// This is only used under macOS, although it should work on iOS as well.
+ (BOOL)isXCTestRunning
{
@ -288,7 +297,27 @@ static id<PEPPassphraseProviderProtocol> s_passphraseProvider = nil;
return isTesting || configFp != nil;
}
/// Creates a pEp directory for use by the engine that is nowhere in a production data area, for use by XCTests.
/// Checks the environment for a variable that hints at development.
///
/// In a development environment, the engine should never read from or write to production data.
///
/// @note While this kind of check is feasible on all kinds of OSs, it should be used only on macOS,
/// because there is a strict separation between a shell environment (used by developers) and the
/// environment used by apps and background tasks.
/// E.g., see https://support.apple.com/guide/terminal/use-environment-variables-apd382cc5fa-4f58-4449-b20a-41c53c006f8f/2.11/mac/11.0
/// @return `YES` when the `PEP_TEST` environment variable is set.
+ (BOOL)isRunningInDevelopmentEnvironment
{
id pEpTest = [[[NSProcessInfo processInfo] environment] valueForKey:@"PEP_TEST"];
return pEpTest != nil;
}
#if TARGET_OS_OSX
/// Creates a pEp directory for use by the engine that doesn't affect production data,
/// e.g. for use by XCTests or when running in a development environment.
///
/// Uses `[NSFileManager URLsForDirectory:inDomains:]`, so not safe for other platforms besides macOS.
+ (NSURL *)createTestDataDirectoryMacOS
{
NSFileManager *fm = [NSFileManager defaultManager];
@ -311,4 +340,6 @@ static id<PEPPassphraseProviderProtocol> s_passphraseProvider = nil;
return dirPath;
}
#endif
@end

Loading…
Cancel
Save