/app/utils/CLI.h

http://github.com/tgunr/passengerpane · C Header · 40 lines · 28 code · 11 blank · 1 comment · 0 complexity · 6a84b18d032eb52ced57ffee52af6466 MD5 · raw file

  1. #import <Foundation/Foundation.h>
  2. #import "CJSONDeserializer.h"
  3. #import "Application.h"
  4. enum {
  5. PPANE_SUCCESS = 0
  6. };
  7. @interface CLI : NSObject {
  8. id appDelegate;
  9. AuthorizationRef authorizationRef;
  10. NSString *pathToCLI;
  11. }
  12. @property (assign) id appDelegate;
  13. @property (assign) NSString *pathToCLI;
  14. + (id) sharedInstance;
  15. - (NSMutableArray *) listApplications;
  16. - (void) add:(Application *)application;
  17. - (void) update:(Application *)application;
  18. - (void) restart:(Application *)application;
  19. - (void) restart;
  20. - (BOOL) isPassengerModuleInstalled;
  21. - (id) execute:(NSArray *)arguments elevated:(BOOL)elevated;
  22. - (id) execute:(NSArray *)arguments;
  23. - (AuthorizationRef) authorizationRef;
  24. - (void) setAuthorizationRef:(AuthorizationRef)ref;
  25. - (void) deauthorize;
  26. - (BOOL) isAuthorized;
  27. // For testing purposed only
  28. - (void) fakeAuthorize;
  29. @end