Browse Source

APPLEMAIL-33 Rename client services names in PEPUpdatesXPCService.

APPLEMAIL-33
David Alarcon 2 years ago
parent
commit
3eb0c3b944
14 changed files with 52 additions and 46 deletions
  1. +22
    -22
      Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService.xcodeproj/project.pbxproj
  2. +2
    -2
      Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPNotificationXPCService/PEPNotificationXPCClient/Interface/PEPNotificationXPCClientService.h
  3. +4
    -4
      Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPNotificationXPCService/PEPNotificationXPCClient/XPCService/PEPNotificationXPCClientService.m
  4. +3
    -0
      Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPNotificationXPCService/PEPNotificationXPCService/XPCService/PEPNotificationXPCApi.m
  5. +6
    -0
      Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPNotificationXPCService/PEPNotificationXPCService/XPCService/PEPNotificationXPCService.m
  6. +1
    -2
      Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPNotificationXPCService/Shared/PEPNotificationXPCApiProtocol.h
  7. +2
    -2
      Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPUpdateDownloadXPCService/PEPUpdateDownloadXPCClient/Interface/PEPUpdateDownloadXPCClientService.h
  8. +4
    -4
      Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPUpdateDownloadXPCService/PEPUpdateDownloadXPCClient/XPCService/PEPUpdateDownloadXPCClientService.m
  9. +0
    -1
      Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPUpdateDownloadXPCService/PEPUpdateDownloadXPCService/XPCService/PEPUpdateDownloadXPCApi.h
  10. +2
    -2
      Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPUpdateDownloadXPCService/PEPUpdateDownloadXPCService/XPCService/PEPUpdateDownloadXPCApi.m
  11. +1
    -1
      Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPUpdateDownloadXPCService/PEPUpdateDownloadXPCService/XPCService/PEPUpdateDownloadXPCService.m
  12. +2
    -3
      Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPUpdateDownloadXPCService/Shared/PEPUpdateDownloadXPCApiProtocol.h
  13. +2
    -2
      Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPUpdatesXPCService.h
  14. +1
    -1
      Submodules/pEpNotifications/PEPUpdatesApp/AppDelegate.swift

+ 22
- 22
Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService.xcodeproj/project.pbxproj View File

@ -7,10 +7,10 @@
objects = {
/* Begin PBXBuildFile section */
4E61821525D58162007E040F /* PEPUpdateDownloadApiClientService.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E61821325D58162007E040F /* PEPUpdateDownloadApiClientService.h */; settings = {ATTRIBUTES = (Public, ); }; };
4E61821625D58162007E040F /* PEPUpdateDownloadApiClientService.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E61821425D58162007E040F /* PEPUpdateDownloadApiClientService.m */; };
4E61823A25D59701007E040F /* PEPNotificationApiClientService.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E61823825D59701007E040F /* PEPNotificationApiClientService.h */; settings = {ATTRIBUTES = (Public, ); }; };
4E61823B25D59701007E040F /* PEPNotificationApiClientService.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E61823925D59701007E040F /* PEPNotificationApiClientService.m */; };
4E61821525D58162007E040F /* PEPUpdateDownloadXPCClientService.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E61821325D58162007E040F /* PEPUpdateDownloadXPCClientService.h */; settings = {ATTRIBUTES = (Public, ); }; };
4E61821625D58162007E040F /* PEPUpdateDownloadXPCClientService.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E61821425D58162007E040F /* PEPUpdateDownloadXPCClientService.m */; };
4E61823A25D59701007E040F /* PEPNotificationXPCClientService.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E61823825D59701007E040F /* PEPNotificationXPCClientService.h */; settings = {ATTRIBUTES = (Public, ); }; };
4E61823B25D59701007E040F /* PEPNotificationXPCClientService.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E61823925D59701007E040F /* PEPNotificationXPCClientService.m */; };
4E61824D25D5A4C5007E040F /* PEPNotificationXPCServiceDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E61824C25D5A4C5007E040F /* PEPNotificationXPCServiceDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
4E797BB825D5255F0090F900 /* PEPNotificationXPCApiProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E797BAA25D5255F0090F900 /* PEPNotificationXPCApiProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
4E797BB925D5255F0090F900 /* PEPNotificationXPCService.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E797BAC25D5255F0090F900 /* PEPNotificationXPCService.m */; };
@ -46,10 +46,10 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
4E61821325D58162007E040F /* PEPUpdateDownloadApiClientService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PEPUpdateDownloadApiClientService.h; sourceTree = "<group>"; };
4E61821425D58162007E040F /* PEPUpdateDownloadApiClientService.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PEPUpdateDownloadApiClientService.m; sourceTree = "<group>"; };
4E61823825D59701007E040F /* PEPNotificationApiClientService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PEPNotificationApiClientService.h; sourceTree = "<group>"; };
4E61823925D59701007E040F /* PEPNotificationApiClientService.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PEPNotificationApiClientService.m; sourceTree = "<group>"; };
4E61821325D58162007E040F /* PEPUpdateDownloadXPCClientService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PEPUpdateDownloadXPCClientService.h; sourceTree = "<group>"; };
4E61821425D58162007E040F /* PEPUpdateDownloadXPCClientService.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PEPUpdateDownloadXPCClientService.m; sourceTree = "<group>"; };
4E61823825D59701007E040F /* PEPNotificationXPCClientService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PEPNotificationXPCClientService.h; sourceTree = "<group>"; };
4E61823925D59701007E040F /* PEPNotificationXPCClientService.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PEPNotificationXPCClientService.m; sourceTree = "<group>"; };
4E61824C25D5A4C5007E040F /* PEPNotificationXPCServiceDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PEPNotificationXPCServiceDelegate.h; sourceTree = "<group>"; };
4E797B9325D523FD0090F900 /* libPEPUpdatesXPCService.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPEPUpdatesXPCService.a; sourceTree = BUILT_PRODUCTS_DIR; };
4E797BAA25D5255F0090F900 /* PEPNotificationXPCApiProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PEPNotificationXPCApiProtocol.h; sourceTree = "<group>"; };
@ -83,13 +83,13 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
4E61820925D57E19007E040F /* PEPUpdateDownloadXPCApiClient */ = {
4E61820925D57E19007E040F /* PEPUpdateDownloadXPCClient */ = {
isa = PBXGroup;
children = (
4E797BAF25D5255F0090F900 /* Interface */,
4E797BB225D5255F0090F900 /* XPCService */,
);
path = PEPUpdateDownloadXPCApiClient;
path = PEPUpdateDownloadXPCClient;
sourceTree = "<group>";
};
4E61820A25D57EBE007E040F /* PEPUpdateDownloadXPCService */ = {
@ -144,13 +144,13 @@
path = Shared;
sourceTree = "<group>";
};
4E61823E25D59737007E040F /* PEPNotificationXPCApiClient */ = {
4E61823E25D59737007E040F /* PEPNotificationXPCClient */ = {
isa = PBXGroup;
children = (
4E797BA925D5255F0090F900 /* Interface */,
4E61824025D5976F007E040F /* XPCService */,
);
path = PEPNotificationXPCApiClient;
path = PEPNotificationXPCClient;
sourceTree = "<group>";
};
4E61823F25D5974F007E040F /* PEPNotificationXPCService */ = {
@ -165,7 +165,7 @@
4E61824025D5976F007E040F /* XPCService */ = {
isa = PBXGroup;
children = (
4E61823925D59701007E040F /* PEPNotificationApiClientService.m */,
4E61823925D59701007E040F /* PEPNotificationXPCClientService.m */,
);
path = XPCService;
sourceTree = "<group>";
@ -221,7 +221,7 @@
isa = PBXGroup;
children = (
4E61823725D59683007E040F /* Shared */,
4E61823E25D59737007E040F /* PEPNotificationXPCApiClient */,
4E61823E25D59737007E040F /* PEPNotificationXPCClient */,
4E61823F25D5974F007E040F /* PEPNotificationXPCService */,
);
path = PEPNotificationXPCService;
@ -230,7 +230,7 @@
4E797BA925D5255F0090F900 /* Interface */ = {
isa = PBXGroup;
children = (
4E61823825D59701007E040F /* PEPNotificationApiClientService.h */,
4E61823825D59701007E040F /* PEPNotificationXPCClientService.h */,
);
path = Interface;
sourceTree = "<group>";
@ -249,7 +249,7 @@
isa = PBXGroup;
children = (
4E61820D25D57F21007E040F /* Shared */,
4E61820925D57E19007E040F /* PEPUpdateDownloadXPCApiClient */,
4E61820925D57E19007E040F /* PEPUpdateDownloadXPCClient */,
4E61820A25D57EBE007E040F /* PEPUpdateDownloadXPCService */,
);
path = PEPUpdateDownloadXPCService;
@ -258,7 +258,7 @@
4E797BAF25D5255F0090F900 /* Interface */ = {
isa = PBXGroup;
children = (
4E61821325D58162007E040F /* PEPUpdateDownloadApiClientService.h */,
4E61821325D58162007E040F /* PEPUpdateDownloadXPCClientService.h */,
);
path = Interface;
sourceTree = "<group>";
@ -266,7 +266,7 @@
4E797BB225D5255F0090F900 /* XPCService */ = {
isa = PBXGroup;
children = (
4E61821425D58162007E040F /* PEPUpdateDownloadApiClientService.m */,
4E61821425D58162007E040F /* PEPUpdateDownloadXPCClientService.m */,
);
path = XPCService;
sourceTree = "<group>";
@ -290,14 +290,14 @@
4E797BC125D5255F0090F900 /* PEPUpdateDownloader.h in Headers */,
4E797BBA25D5255F0090F900 /* PEPNotificationXPCService.h in Headers */,
4E797BB825D5255F0090F900 /* PEPNotificationXPCApiProtocol.h in Headers */,
4E61821525D58162007E040F /* PEPUpdateDownloadApiClientService.h in Headers */,
4E61821525D58162007E040F /* PEPUpdateDownloadXPCClientService.h in Headers */,
4E797BBD25D5255F0090F900 /* PEPUpdateDownloadXPCApi.h in Headers */,
4E797BC025D5255F0090F900 /* PEPUpdateDownloadXPCService.h in Headers */,
4E61824D25D5A4C5007E040F /* PEPNotificationXPCServiceDelegate.h in Headers */,
4EC7BADE25DA6AB100F42C5B /* PEPUpdatesXPCService.h in Headers */,
4EA193EA25D6829B00F5D802 /* PEPNotificationXPCApi.h in Headers */,
4E797BBB25D5255F0090F900 /* PEPUpdateDownloadXPCApiProtocol.h in Headers */,
4E61823A25D59701007E040F /* PEPNotificationApiClientService.h in Headers */,
4E61823A25D59701007E040F /* PEPNotificationXPCClientService.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -382,11 +382,11 @@
buildActionMask = 2147483647;
files = (
4EC7BADF25DA6AB100F42C5B /* PEPUpdatesXPCService.m in Sources */,
4E61823B25D59701007E040F /* PEPNotificationApiClientService.m in Sources */,
4E61823B25D59701007E040F /* PEPNotificationXPCClientService.m in Sources */,
4E797BBE25D5255F0090F900 /* PEPUpdateDownloadXPCService.m in Sources */,
4E797BB925D5255F0090F900 /* PEPNotificationXPCService.m in Sources */,
4EA193EB25D6829B00F5D802 /* PEPNotificationXPCApi.m in Sources */,
4E61821625D58162007E040F /* PEPUpdateDownloadApiClientService.m in Sources */,
4E61821625D58162007E040F /* PEPUpdateDownloadXPCClientService.m in Sources */,
4E797BBF25D5255F0090F900 /* PEPUpdateDownloadXPCApi.m in Sources */,
4E797BBC25D5255F0090F900 /* PEPUpdateDownloader.mm in Sources */,
);


Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPNotificationXPCService/PEPNotificationXPCApiClient/Interface/PEPNotificationApiClientService.h → Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPNotificationXPCService/PEPNotificationXPCClient/Interface/PEPNotificationXPCClientService.h View File


Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPNotificationXPCService/PEPNotificationXPCApiClient/XPCService/PEPNotificationApiClientService.m → Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPNotificationXPCService/PEPNotificationXPCClient/XPCService/PEPNotificationXPCClientService.m View File


+ 3
- 0
Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPNotificationXPCService/PEPNotificationXPCService/XPCService/PEPNotificationXPCApi.m View File

@ -38,6 +38,9 @@
break;
case ready:
[self.delegate pEpNotificationReady];
break;
default:
NSAssert(NO, @"Unhandled case.");
}
}


+ 6
- 0
Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPNotificationXPCService/PEPNotificationXPCService/XPCService/PEPNotificationXPCService.m View File

@ -19,6 +19,12 @@
@implementation PEPNotificationXPCService
- (instancetype)init {
NSAssert(NO, @"Use initWithDelegate instead.");
return nil;
}
- (instancetype)initWithDelegate:(id<PEPNotificationXPCServiceDelegate>)delegate {
if (self = [super init]) {
_listener = [NSXPCListener anonymousListener];


+ 1
- 2
Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPNotificationXPCService/Shared/PEPNotificationXPCApiProtocol.h View File

@ -11,8 +11,7 @@
NS_ASSUME_NONNULL_BEGIN
/// Notification types
// TODO: Maybe does not belong to this protocol
//NS_ENUM(int, DNType) {
//NS_CLOSED_ENUM(int, DNType) {
// ready = 0,
// downloading,
// downloadArrived,


Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPUpdateDownloadXPCService/PEPUpdateDownloadXPCApiClient/Interface/PEPUpdateDownloadApiClientService.h → Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPUpdateDownloadXPCService/PEPUpdateDownloadXPCClient/Interface/PEPUpdateDownloadXPCClientService.h View File


Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPUpdateDownloadXPCService/PEPUpdateDownloadXPCApiClient/XPCService/PEPUpdateDownloadApiClientService.m → Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPUpdateDownloadXPCService/PEPUpdateDownloadXPCClient/XPCService/PEPUpdateDownloadXPCClientService.m View File


+ 0
- 1
Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPUpdateDownloadXPCService/PEPUpdateDownloadXPCService/XPCService/PEPUpdateDownloadXPCApi.h View File

@ -13,7 +13,6 @@
NS_ASSUME_NONNULL_BEGIN
@interface PEPUpdateDownloadXPCApi : NSObject <PEPUpdateDownloadXPCApiProtocol>
@property (retain) NSXPCConnection* clientConnection;
@end
NS_ASSUME_NONNULL_END

+ 2
- 2
Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPUpdateDownloadXPCService/PEPUpdateDownloadXPCService/XPCService/PEPUpdateDownloadXPCApi.m View File

@ -9,7 +9,7 @@
#import "PEPUpdateDownloadXPCApi.h"
#import "PEPNotificationXPCApiProtocol.h"
#import "PEPUpdateDownloader.h"
#import "PEPNotificationApiClientService.h"
#import "PEPNotificationXPCClientService.h"
//extern PEPUpdateDownloader* updater;
@interface PEPUpdateDownloadXPCApi ()
@ -25,7 +25,7 @@
self.updater = [PEPUpdateDownloader new];
}
PEPNotificationApiClientService *service = [[PEPNotificationApiClientService alloc] initWithListenerEndpoint:endpoint updateDownloader:self.updater];
PEPNotificationXPCClientService *service = [[PEPNotificationXPCClientService alloc] initWithListenerEndpoint:endpoint updateDownloader:self.updater];
[service start];
}


+ 1
- 1
Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPUpdateDownloadXPCService/PEPUpdateDownloadXPCService/XPCService/PEPUpdateDownloadXPCService.m View File

@ -33,7 +33,7 @@
[self.listener resume];
BOOL opened = [self startPEPUpdatesApp];
assert(opened);
NSAssert(opened, @"Fail to open pp updates.app.");
}
// MARK: - Private


+ 2
- 3
Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPUpdateDownloadXPCService/Shared/PEPUpdateDownloadXPCApiProtocol.h View File

@ -11,14 +11,13 @@
static NSString *pEpUpdateDownloadXPCMachName = @"foundation.pEp.adapter.macOS_OpenStep";
/// This protocol is providing the XPC interface to the User Interface program pEpNotifications
/// This protocol is providing the XPC interface to the User Interface
@protocol PEPUpdateDownloadXPCApiProtocol
/**
subscribe to the published notifications about downloads arriving
- Parameter downloading: block to call back when a download is going to happen
- Parameter downloadArrived: block to call back when a download arrived
- Parameter endpoint
*/
- (void)subscribeForUpdate:(NSXPCListenerEndpoint*)endpoint;


+ 2
- 2
Submodules/PEPUpdatesXPCService/PEPUpdatesXPCService/PEPUpdatesXPCService.h View File

@ -8,10 +8,10 @@
#import <Foundation/Foundation.h>
#import "PEPUpdateDownloadXPCApiProtocol.h"
#import "PEPUpdateDownloadApiClientService.h"
#import "PEPUpdateDownloadXPCClientService.h"
#import "PEPUpdateDownloadXPCService.h"
#import "PEPNotificationXPCApiProtocol.h"
#import "PEPNotificationApiClientService.h"
#import "PEPNotificationXPCClientService.h"
#import "PEPNotificationXPCServiceDelegate.h"
#import "PEPNotificationXPCService.h"


+ 1
- 1
Submodules/pEpNotifications/PEPUpdatesApp/AppDelegate.swift View File

@ -25,7 +25,7 @@ class AppDelegate: NSObject {
// MARK: - Properties
private var statusBarItem: NSStatusItem? = nil
private lazy var updateDownloadClientService = PEPUpdateDownloadApiClientService()
private lazy var updateDownloadClientService = PEPUpdateDownloadXPCClientService()
private lazy var notificationService = PEPNotificationXPCService(delegate: self)
private var nc = NSUserNotificationCenter.default
private lazy var downloadStateNotifier = DownloadStateNotifier(at: statusText)


Loading…
Cancel
Save