//
//  JuicePluginController.h
//  XprobePlugin
//
//  Created by John Holdsworth on 01/05/2014.
//  Copyright (c) 2014 John Holdsworth. All rights reserved.
//

#import <Foundation/Foundation.h>

#define JUICABLE_PATTERN @"[^~]\\.(mm?|swift|storyboard|xib)$"

#define JUICE_ENGINE_DO @"juice.engine"
#define JUICE_PORT 31441

// service plugin makes available to engine
@protocol JuicePlugin <NSObject>
@required
- (BOOL)loadBundleInDebugger:(NSString *)bundlePath;
@end

// services made available to plugin
@protocol JuiceService
@required
- (NSString *)xcodeStarted:(NSString *)xcodePath plugin:(id<JuicePlugin>)plugin;
- (oneway void)workspaceChanged:(NSString *)workspacePath logDirectory:(NSString *)logDirectory;
- (oneway void)appCode:(NSString *)workspacePath injectSources:(NSArray *)modifiedSourceFiles;
- (oneway void)injectSources:(NSArray *)modifiedSourceFiles resetApp:(BOOL)reset;
- (BOOL)loadBundleForPlugin:(NSString *)resourcePath;
- (NSString *)sourceForClass:(NSString *)className;
- (oneway void)evalCode:(NSString *)code;
- (oneway void)displayParameters;
- (oneway void)unpatchProject;
- (BOOL)patchProject;
@end

@interface JuicePluginController : NSObject

@end

