/* Writed by Averous Julien-Pierre, www.sourcemac.com */


/* Controller */

#import <Cocoa/Cocoa.h>

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>

@interface Controller : NSObject
{
    IBOutlet id com_cont;
    IBOutlet id com_exit;
    IBOutlet id com_gasz;
    IBOutlet id com_gfsz;
    IBOutlet id com_glsz;
    IBOutlet id com_list;
    IBOutlet id com_mxid;
    IBOutlet id com_run;
	IBOutlet id com_run_args;
    IBOutlet id com_size;
    IBOutlet id com_size_id;
	IBOutlet id com_dump;
	IBOutlet id com_dump_all;
	IBOutlet id com_dump_id;
    IBOutlet id softPath;
    IBOutlet id win;
	
	NSMutableArray* ids;
	NSTask		*tsk;
	NSString	*pathString;
	int			sock;
	char		buffer[2048];
	
	float		baseHeight;
}

- (IBAction)Com_Cont:(id)sender;
- (IBAction)Com_Exit:(id)sender;
- (IBAction)Com_Gasz:(id)sender;
- (IBAction)Com_Gfsz:(id)sender;
- (IBAction)Com_Glsz:(id)sender;
- (IBAction)Com_List:(id)sender;
- (IBAction)Com_Mxid:(id)sender;
- (IBAction)Com_Run:(id)sender;
- (IBAction)Com_Size:(id)sender;
- (IBAction)Com_Dump:(id)sender;
- (IBAction)Com_Dump_All:(id)sender;
- (IBAction)LoadSoft:(id)sender;

- (void)loadCommunication;
- (void)comError;
- (void)runSockRunLoop:(id)obj;

- (void)openPanelDidEnd:(NSOpenPanel *)panel returnCode:(int)returnCode contextInfo:(void *)contextInfo;
@end
