#include "GSCamera.h" @implementation GSCamera - (id) initWithName: (NSString *) aName Port: (NSString *) aPort Camera: (Camera *) aCamera { [super init]; theName = [[NSString alloc] initWithString: aName]; thePort = [[NSString alloc] initWithString: aPort]; theCamera = aCamera; return self; } - (void) dealloc { RELEASE(theName); RELEASE(thePort); free(theCamera); } - (NSString *) name { return theName; } - (NSString *) port { return thePort; } - (NSArray *) filesInPath: (NSString *) aPath { CameraList *list; GPContext *context; int i, count; NSMutableArray *ar = [[NSMutableArray alloc] init]; context = gp_context_new(); gp_list_new(&list); gp_camera_folder_list_files(theCamera, [aPath cString], list, context); count = gp_list_count (list); for (i=0; i