IOSAD-103 can get/set syncSendMessageDelegate IOSAD-103
authorDirk Zimmermann <dirk@pep-project.org>
Fri, 05 Oct 2018 12:09:01 +0200
branchIOSAD-103
changeset 686fec1eae409cd
parent 685 183e84692661
child 687 5352ef112320
IOSAD-103 can get/set syncSendMessageDelegate
pEpObjCAdapter.xcodeproj/project.pbxproj
pEpObjCAdapter/PEPSync.h
pEpObjCAdapter/PEPSync.m
pEpObjCAdapter/PEPSyncSendMessageDelegate.h
pEpObjCAdapter/PEPSyncSendMessageDelegate.m
     1.1 --- a/pEpObjCAdapter.xcodeproj/project.pbxproj	Fri Oct 05 08:47:32 2018 +0200
     1.2 +++ b/pEpObjCAdapter.xcodeproj/project.pbxproj	Fri Oct 05 12:09:01 2018 +0200
     1.3 @@ -34,6 +34,7 @@
     1.4  		435665CC2080A6CB00EC5B10 /* NSNumber+PEPRating.m in Sources */ = {isa = PBXBuildFile; fileRef = 435665CB2080A6CB00EC5B10 /* NSNumber+PEPRating.m */; };
     1.5  		435796E31FB5E51A00395A9E /* PEPMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 435796E21FB5E51A00395A9E /* PEPMessage.m */; };
     1.6  		43676B661C57EA1A00233933 /* B623F674_sec.asc in Resources */ = {isa = PBXBuildFile; fileRef = 43676B641C57EA1A00233933 /* B623F674_sec.asc */; };
     1.7 +		438C4395216744DA00C7425B /* PEPSyncSendMessageDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 438C4394216744DA00C7425B /* PEPSyncSendMessageDelegate.m */; };
     1.8  		439393E6208F375800EB1DBD /* NSObject+Extension.m in Sources */ = {isa = PBXBuildFile; fileRef = 439393E5208F375800EB1DBD /* NSObject+Extension.m */; };
     1.9  		439393F8208F5B5E00EB1DBD /* NSMutableDictionary+PEP.m in Sources */ = {isa = PBXBuildFile; fileRef = 439393F7208F5B5E00EB1DBD /* NSMutableDictionary+PEP.m */; };
    1.10  		43953B3520C91E2B001C7DDB /* NSDictionary+Debug.m in Sources */ = {isa = PBXBuildFile; fileRef = 43953B3420C91E2B001C7DDB /* NSDictionary+Debug.m */; };
    1.11 @@ -169,6 +170,8 @@
    1.12  		435796E21FB5E51A00395A9E /* PEPMessage.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PEPMessage.m; sourceTree = "<group>"; };
    1.13  		43676B631C57EA1A00233933 /* 0xB623F674.asc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = 0xB623F674.asc; sourceTree = "<group>"; };
    1.14  		43676B641C57EA1A00233933 /* B623F674_sec.asc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = B623F674_sec.asc; sourceTree = "<group>"; };
    1.15 +		438C4393216744DA00C7425B /* PEPSyncSendMessageDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PEPSyncSendMessageDelegate.h; sourceTree = "<group>"; };
    1.16 +		438C4394216744DA00C7425B /* PEPSyncSendMessageDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PEPSyncSendMessageDelegate.m; sourceTree = "<group>"; };
    1.17  		439393E4208F375800EB1DBD /* NSObject+Extension.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSObject+Extension.h"; sourceTree = "<group>"; };
    1.18  		439393E5208F375800EB1DBD /* NSObject+Extension.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSObject+Extension.m"; sourceTree = "<group>"; };
    1.19  		439393F6208F5B5E00EB1DBD /* NSMutableDictionary+PEP.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSMutableDictionary+PEP.h"; sourceTree = "<group>"; };
    1.20 @@ -335,6 +338,8 @@
    1.21  				43F73BD32165F6EC00AB4524 /* PEPLock.m */,
    1.22  				43F73BE82166248E00AB4524 /* PEPSync.h */,
    1.23  				43F73BE92166248E00AB4524 /* PEPSync.m */,
    1.24 +				438C4393216744DA00C7425B /* PEPSyncSendMessageDelegate.h */,
    1.25 +				438C4394216744DA00C7425B /* PEPSyncSendMessageDelegate.m */,
    1.26  			);
    1.27  			path = pEpObjCAdapter;
    1.28  			sourceTree = "<group>";
    1.29 @@ -519,6 +524,7 @@
    1.30  				43209B421ECC2DBC007E7E2E /* PEPQueue.m in Sources */,
    1.31  				435665CC2080A6CB00EC5B10 /* NSNumber+PEPRating.m in Sources */,
    1.32  				439393F8208F5B5E00EB1DBD /* NSMutableDictionary+PEP.m in Sources */,
    1.33 +				438C4395216744DA00C7425B /* PEPSyncSendMessageDelegate.m in Sources */,
    1.34  				43F73BEA2166248E00AB4524 /* PEPSync.m in Sources */,
    1.35  				15206CC71F8E078B003FF880 /* PEPSession.m in Sources */,
    1.36  			);
     2.1 --- a/pEpObjCAdapter/PEPSync.h	Fri Oct 05 08:47:32 2018 +0200
     2.2 +++ b/pEpObjCAdapter/PEPSync.h	Fri Oct 05 12:09:01 2018 +0200
     2.3 @@ -13,6 +13,15 @@
     2.4  PEP_STATUS messageToSendObjc(struct _message *msg);
     2.5  int inject_sync_eventObjc(SYNC_EVENT ev, void *management);
     2.6  
     2.7 +@class PEPSyncSendMessageDelegate;
     2.8 +
     2.9  @interface PEPSync : NSObject
    2.10  
    2.11 ++ (void)setPEPSyncSendMessageDelegate:
    2.12 +(PEPSyncSendMessageDelegate * _Nullable)syncSendMessageDelegate;
    2.13 +
    2.14 ++ (PEPSyncSendMessageDelegate * _Nullable)syncSendMessageDelegate;
    2.15 +
    2.16 +@property (nonatomic, nullable, weak) PEPSyncSendMessageDelegate *syncSendMessageDelegate;
    2.17 +
    2.18  @end
     3.1 --- a/pEpObjCAdapter/PEPSync.m	Fri Oct 05 08:47:32 2018 +0200
     3.2 +++ b/pEpObjCAdapter/PEPSync.m	Fri Oct 05 12:09:01 2018 +0200
     3.3 @@ -8,6 +8,8 @@
     3.4  
     3.5  #import "PEPSync.h"
     3.6  
     3.7 +#import "PEPSyncSendMessageDelegate.h"
     3.8 +
     3.9  PEP_STATUS messageToSendObjc(struct _message *msg)
    3.10  {
    3.11      return PEP_STATUS_OK;
    3.12 @@ -18,6 +20,29 @@
    3.13      return 0;
    3.14  }
    3.15  
    3.16 +static __weak PEPSyncSendMessageDelegate *s_PEPSyncSendMessageDelegate;
    3.17 +
    3.18  @implementation PEPSync
    3.19  
    3.20 ++ (void)setPEPSyncSendMessageDelegate:
    3.21 +(PEPSyncSendMessageDelegate * _Nullable)syncSendMessageDelegate
    3.22 +{
    3.23 +    s_PEPSyncSendMessageDelegate = syncSendMessageDelegate;
    3.24 +}
    3.25 +
    3.26 ++ (PEPSyncSendMessageDelegate * _Nullable)syncSendMessageDelegate
    3.27 +{
    3.28 +    return s_PEPSyncSendMessageDelegate;
    3.29 +}
    3.30 +
    3.31 +- (void)setSyncSendMessageDelegate:(PEPSyncSendMessageDelegate *)syncSendMessageDelegate
    3.32 +{
    3.33 +    [PEPSync setPEPSyncSendMessageDelegate:syncSendMessageDelegate];
    3.34 +}
    3.35 +
    3.36 +- (PEPSyncSendMessageDelegate *)syncSendMessageDelegate
    3.37 +{
    3.38 +    return [PEPSync syncSendMessageDelegate];
    3.39 +}
    3.40 +
    3.41  @end
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/pEpObjCAdapter/PEPSyncSendMessageDelegate.h	Fri Oct 05 12:09:01 2018 +0200
     4.3 @@ -0,0 +1,17 @@
     4.4 +//
     4.5 +//  PEPSyncSendMessageDelegate.h
     4.6 +//  pEpObjCAdapter
     4.7 +//
     4.8 +//  Created by Dirk Zimmermann on 05.10.18.
     4.9 +//  Copyright © 2018 p≡p. All rights reserved.
    4.10 +//
    4.11 +
    4.12 +#import <Foundation/Foundation.h>
    4.13 +
    4.14 +NS_ASSUME_NONNULL_BEGIN
    4.15 +
    4.16 +@interface PEPSyncSendMessageDelegate : NSObject
    4.17 +
    4.18 +@end
    4.19 +
    4.20 +NS_ASSUME_NONNULL_END
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/pEpObjCAdapter/PEPSyncSendMessageDelegate.m	Fri Oct 05 12:09:01 2018 +0200
     5.3 @@ -0,0 +1,13 @@
     5.4 +//
     5.5 +//  PEPSyncSendMessageDelegate.m
     5.6 +//  pEpObjCAdapter
     5.7 +//
     5.8 +//  Created by Dirk Zimmermann on 05.10.18.
     5.9 +//  Copyright © 2018 p≡p. All rights reserved.
    5.10 +//
    5.11 +
    5.12 +#import "PEPSyncSendMessageDelegate.h"
    5.13 +
    5.14 +@implementation PEPSyncSendMessageDelegate
    5.15 +
    5.16 +@end