Browse Source

add some logging

works_for_me
Volker Birk 2 years ago
parent
commit
2a84de8d69
2 changed files with 8 additions and 4 deletions
  1. +0
    -1
      pEpMacOSAdapter/pEpMacOSAdapter.h
  2. +8
    -3
      pEpMacOSAdapter/pEpMacOSAdapter.m

+ 0
- 1
pEpMacOSAdapter/pEpMacOSAdapter.h View File

@ -13,7 +13,6 @@
/// This object implements the protocol which we have defined. It provides the actual behavior for the service. It is 'exported' by the service to make it available to the process hosting the service over an NSXPCConnection.
@interface pEpMacOSAdapter : NSObject <pEpMacOSAdapterProtocol>
@property (retain) NSXPCListenerEndpoint* clientEndpoint;
@property (retain) NSXPCConnection* clientConnection;
@end

+ 8
- 3
pEpMacOSAdapter/pEpMacOSAdapter.m View File

@ -20,13 +20,18 @@ static pEpUpdater* _updater = nil;
{
NSLog(@"subscribeForUpdate called");
_clientEndpoint = endpoint;
_clientConnection = [[NSXPCConnection alloc] initWithListenerEndpoint:_clientEndpoint];
_clientConnection = [[NSXPCConnection alloc] initWithListenerEndpoint:endpoint];
_clientConnection.remoteObjectInterface = [NSXPCInterface
interfaceWithProtocol:@protocol(pEpNotificationProtocol)];
_clientConnection.interruptionHandler = ^(){NSLog(@"interruption");};
_clientConnection.invalidationHandler = ^(){NSLog(@"invalidation");};
[_clientConnection resume];
pEpNotification* downloadNotification = [_clientConnection remoteObjectProxy];
pEpNotification* downloadNotification = [_clientConnection remoteObjectProxyWithErrorHandler:^(NSError*err) {
NSLog(@"%@", err);
}];
if (downloadNotification) {
if (!_updater) {
_updater = [[pEpUpdater alloc] initWithSubscriber:downloadNotification];


Loading…
Cancel
Save