//
|
|
// main.m
|
|
// pEpMacOSAdapter
|
|
//
|
|
// Created by Volker Birk on 20.04.20.
|
|
// Copyleft © 2020 p≡p foundation.
|
|
// This file is under GNU General Public License 3.0
|
|
//
|
|
|
|
@import Foundation;
|
|
|
|
#import <PEPObjCAdapterXPCService.h>
|
|
#import <PEPUpdateDownloadXPCService.h>
|
|
#include <signal.h>
|
|
|
|
void signal_TERM(int signal)
|
|
{
|
|
NSLog(@"stopping agent");
|
|
exit(0);
|
|
}
|
|
|
|
int main(int argc, const char *argv[])
|
|
{
|
|
signal(SIGTERM, signal_TERM);
|
|
|
|
// Create an instance of the PEP updatedownload service and start it
|
|
PEPUpdateDownloadXPCService *updateDownloadService = [PEPUpdateDownloadXPCService new];
|
|
[updateDownloadService start];
|
|
|
|
// Create an instance of the PEP ObjC wrapper Adapter and start it
|
|
PEPObjCAdapterXPCService *objCAdapterService = [PEPObjCAdapterXPCService new];
|
|
[objCAdapterService start];
|
|
|
|
NSLog(@"going into main runLoop");
|
|
NSRunLoop* runLoop = [NSRunLoop currentRunLoop];
|
|
[runLoop run];
|
|
|
|
return EXIT_FAILURE;
|
|
}
|