source: launchers/macosx/RouterTask.h @ e8decff5

Last change on this file since e8decff5 was e8decff5, checked in by meeh <meeh@…>, 2 years ago

Mac OS X Launcher: more cleanup and some bugfixes.

  • Property mode set to 100644
File size: 1.4 KB
Line 
1#pragma once
2
3#include <dispatch/dispatch.h>
4#include <memory.h>
5
6#include <Cocoa/Cocoa.h>
7#import <AppKit/AppKit.h>
8
9#ifdef __cplusplus
10#include <vector>
11#include <string>
12
13const std::vector<NSString*> defaultStartupFlags {
14  @"-Xmx512M",
15  @"-Xms128m",
16  @"-Djava.awt.headless=true",
17  @"-Dwrapper.logfile=/tmp/router.log",
18  @"-Dwrapper.logfile.loglevel=DEBUG",
19  @"-Dwrapper.java.pidfile=/tmp/routerjvm.pid",
20  @"-Dwrapper.console.loglevel=DEBUG"
21};
22
23const std::vector<std::string> defaultFlagsForExtractorJob {
24  "-Xmx512M",
25  "-Xms128m",
26  "-Djava.awt.headless=true"
27};
28
29#endif
30
31
32@class RTaskOptions;
33@interface RTaskOptions : NSObject
34@property (strong) NSString* binPath;
35@property (strong) NSArray<NSString *>* arguments;
36@property (strong) NSString* i2pBaseDir;
37@end
38
39@class I2PRouterTask;
40@interface I2PRouterTask : NSObject
41@property (strong) NSTask* routerTask;
42@property (strong) NSUserDefaults *userPreferences;
43@property (strong) NSFileHandle *readLogHandle;
44@property (strong) NSMutableData *totalLogData;
45@property (strong) NSPipe *processPipe;
46@property (strong) NSFileHandle *input;
47@property (atomic) BOOL isRouterRunning;
48@property (atomic) BOOL userRequestedRestart;
49- (instancetype) initWithOptions : (RTaskOptions*) options;
50- (int) execute;
51- (void) requestShutdown;
52- (void) requestRestart;
53- (BOOL) isRunning;
54- (int) getPID;
55- (void)routerStdoutData:(NSNotification *)notification;
56@end
57
58
59
60
61
62
Note: See TracBrowser for help on using the repository browser.