camera-0.8.0/0000755000175000017500000000000010110745623013546 5ustar gurkangurkan00000000000000camera-0.8.0/AppDelegate.h0000644000175000017500000000111507775067560016114 0ustar gurkangurkan00000000000000 // created 11.2003 by Stefan Kleine Stegemann // // licensed under GPL #ifndef _H_APPDELEGATE #define _H_APPDELEGATE #include #include #include #include @interface AppDelegate : NSObject { } - (id) init; - (void) dealloc; - (void) applicationDidFinishLaunching: (NSNotification*) notification; // Services - (void) downloadFilesToPlace: (NSPasteboard*) pboard userData: (NSString*) userData error: (NSString**) error; @end #endif camera-0.8.0/AppDelegate.m0000644000175000017500000000204507775067560016124 0ustar gurkangurkan00000000000000 // created 11.2003 by Stefan Kleine Stegemann // // licensed under GPL #include "AppDelegate.h" /* * Non-Public methods. */ @interface AppDelegate(Private) @end /* * Camera's delegate. */ @implementation AppDelegate - (id) init { if ((self = [super init])) { // ... } return self; } - (void) dealloc { [super dealloc]; } - (void) applicationDidFinishLaunching: (NSNotification*) notification { [[NSApplication sharedApplication] setServicesProvider: self]; NSLog(@"Service provider registered"); } /* * A service that downloads all files from the camera * to a directory. */ - (void) downloadFilesToPlace: (NSPasteboard*)pboard userData: (NSString*)userData error: (NSString**)error { NSString* directory; NSLog(@"Service downloadFilesToPlace invoked"); directory = [pboard stringForType: NSFilenamesPboardType]; if (!directory) { *error = @"No directory selected."; return; } NSLog(@"downloading files to %@", directory); } @end camera-0.8.0/Camera.pcproj0000644000175000017500000000262207756764673016213 0ustar gurkangurkan00000000000000{ APPCLASS = NSApplication; APPKIT = "GNUSTEP-GUI"; APPLICATIONICON = ""; BUILDTOOL = "/usr/bin/make"; CLASS_FILES = ( main.m, CameraController.m, DigitalCamera.m ); COMPILEROPTIONS = ""; CREATION_DATE = ""; DOCU_FILES = ( ); FOUNDATION = "GNUSTEP-BASE"; FRAMEWORKS = ( ); HEADER_FILES = ( CameraController.h, DigitalCamera.h ); IMAGES = ( ); INSTALLDIR = "$(GNUSTEP_LOCAL_ROOT)/"; INTERFACES = ( Camera.gorm ); LANGUAGE = English; LAST_EDITING = ""; LIBRARIES = ( "gnustep-base", "gnustep-gui" ); LINKEROPTIONS = ""; MAININTERFACE = Camera.gorm; MAKEFILEDIR = "$(GNUSTEP_SYSTEM_ROOT)/Makefiles"; OTHER_FILES = ( ); OTHER_RESOURCES = ( CameraInfo.plist ); OTHER_SOURCES = ( ); PRINCIPAL_CLASS = main.m; PROJECT_BUILDER = PCGormProj; PROJECT_COPYRIGHT = "No license specified!"; PROJECT_CREATOR = ""; PROJECT_DESCRIPTION = "No description avaliable!"; PROJECT_GROUP = "No description avaliable!"; PROJECT_MAINTAINER = ""; PROJECT_NAME = Camera; PROJECT_RELEASE = 1; PROJECT_SOURCE = "%{gs_name}-%{gs_version}.tar.gz"; PROJECT_SUMMARY = "No summary avaliable!"; PROJECT_TYPE = PCGormProject; PROJECT_VERSION = 1.0; SUBPROJECTS = ( ); SUPPORTING_FILES = ( GNUmakefile.preamble, GNUmakefile, GNUmakefile.postamble ); }camera-0.8.0/CameraController.h0000644000175000017500000000270507761467140017174 0ustar gurkangurkan00000000000000 // created 11.2003 by Stefan Kleine Stegemann // // licensed under GPL #ifndef _H_CAMERA_CONTROLLER #define _H_CAMERA_CONTROLLER #include #include #include #include #include "DigitalCamera.h" extern NSString* PREF_DOWNLOAD_BASE_PATH; extern NSString* PREF_USE_TIMESTAMP_DIR; @interface CameraController : NSObject { DigitalCamera* selectedCamera; BOOL downloadIsActive; // Outlets id deleteFilesAfterDownload; id progressInfoMsg; id progressBar; id thumbnailView; id transferButton; id cameraInfo; id cameraIcon; id window; } - (id) init; - (void) dealloc; - (void) awakeFromNib; - (void) setSelectedCamera: (DigitalCamera*)aCamera; - (DigitalCamera*) selectedCamera; - (void) setDownloadIsActive: (BOOL)active; - (BOOL) downloadIsActive; // Notifications - (void) willDownloadFile: (DigitalCameraFile*)file at: (int)index of: (int)total thumbnail: (NSImage*)thumbnail; - (void) willDeleteFile: (DigitalCameraFile*)file at: (int)index of: (int)total; - (void) downloadFinished; // Actions - (void) detectCamera: (id)sender; - (void) initiateDownloadFiles: (id)sender; - (void) abortDownloadFiles: (id)sender; - (void) initiateOrAbortDownload: (id)sender; - (void) setDestination: (id)sender; @end #endif camera-0.8.0/CameraController.m0000644000175000017500000003707407775067375017223 0ustar gurkangurkan00000000000000 // created 11.2003 by Stefan Kleine Stegemann // // licensed under GPL #include "CameraController.h" #include "OpenPanelAddons.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include NSString* PREF_DOWNLOAD_BASE_PATH = @"DownloadBasePath"; NSString* PREF_USE_TIMESTAMP_DIR = @"UseTimestampDirectory"; static NSString* DEFAULT_DOWNLOAD_PATH = @"Multimedia/Pictures/Photos"; static NSString* DOWNLOAD_PATH = @"DownloadPath"; static NSString* CAMERA = @"Camera"; static NSString* FILES_TO_DOWNLOAD = @"FilesToDownload"; static NSString* DELETE_FILES = @"DeleteFilesAfterDownload"; static NSString* GOTO_DOWNLOAD_LOCATION = @"GotoDownloadLocation"; // this is a temporary workaround to disable // thumbnails on systems that use wraster for // jpeg processing. this is not multi-thread- // capable. static BOOL WithThumbnails; /* * Non-Public methods. */ @interface CameraController(Private) - (void) _downloadFiles: (id)params; - (NSString*) _downloadBasePath; - (void) _ensurePathExists: (NSString*)path; - (NSString*) _getUnusedFilenameBasedOn: (NSString*)filename; - (NSImage*) _defaultThumbnail; @end /* * Controls the Camera Application. */ @implementation CameraController /* * Designated initializer. */ - (id) init { if ((self = [super init])) { selectedCamera = nil; [self setDownloadIsActive: NO]; } return self; } - (void) dealloc { [self setSelectedCamera: nil]; [super dealloc]; } /* * only as long as we need to take care about * wraster-based guis */ + (void) initialize { NSUserDefaults* defs = [NSUserDefaults standardUserDefaults]; NSMutableDictionary* standardDefaults = [NSMutableDictionary dictionary]; NSString* defaultDestination; // use timestamp directory by default [standardDefaults setObject: [NSNumber numberWithBool: YES] forKey: PREF_USE_TIMESTAMP_DIR]; defaultDestination = [NSHomeDirectory() stringByAppendingPathComponent: DEFAULT_DOWNLOAD_PATH]; [standardDefaults setObject: defaultDestination forKey: PREF_DOWNLOAD_BASE_PATH]; [defs registerDefaults: standardDefaults]; // use thumbnails? WithThumbnails = [defs boolForKey: @"WithThumbnails"]; } - (void) awakeFromNib { [self downloadFinished]; [progressInfoMsg setStringValue: @""]; // remove thumbnail if thumbnails are disabled if (!WithThumbnails) { float height = [thumbnailView frame].size.height; NSRect frame = [window frame]; frame.size.height -= height; [thumbnailView removeFromSuperview]; [window setFrame: frame display: YES]; [cameraInfo setFrameOrigin: NSMakePoint([cameraInfo frame].origin.x, [cameraInfo frame].origin.y - height)]; [cameraIcon setFrameOrigin: NSMakePoint([cameraIcon frame].origin.x, [cameraIcon frame].origin.y - height)]; } [self detectCamera: nil]; } /* * Tries to detect a connected camera. */ - (void) detectCamera: (id)sender { NSArray* cameras; cameras = [DigitalCamera autodetectCameras]; if ([cameras count]) { // use the first detected camera [self setSelectedCamera: [cameras objectAtIndex: 0]]; } else { [self setSelectedCamera: nil]; } } /* * Set the selected camera. */ - (void) setSelectedCamera: (DigitalCamera*)aCamera { RELEASE(selectedCamera); selectedCamera = aCamera; RETAIN(selectedCamera); if (selectedCamera) { [cameraInfo setStringValue: [aCamera name]]; NSLog(@"using camera %@ at port %@", [aCamera name], [aCamera portName]); } else { [cameraInfo setStringValue: @"no camera"]; } } /* * Get the selected camera. */ - (DigitalCamera*) selectedCamera { return selectedCamera; } /* * Set a status that indicates whether a download * is active at the moment. */ - (void) setDownloadIsActive: (BOOL)active { downloadIsActive = active; } /* * Returns YES if a download is currently active. */ - (BOOL) downloadIsActive { return downloadIsActive; } /* * Start downloading the files from the selected * Camera. */ - (void) initiateDownloadFiles: (id)sender { NSMutableDictionary* threadParams; NSString* downloadPath; BOOL deleteFiles; NSArray* files; if (![self selectedCamera]) { // TODO: localize this NSRunAlertPanel(@"Error while downloading files!", @"No camera was found on your system.", @"Confirm", nil, nil); return; } // initiate download parameters downloadPath = [self _downloadBasePath]; [self _ensurePathExists: downloadPath]; deleteFiles = ([deleteFilesAfterDownload state] == NSOnState); // TODO: save in user prefs files = [[self selectedCamera] availableFiles]; if ([files count] == 0) { // TODO: localize this NSRunAlertPanel(@"Nothing to download!", @"There are no files on this camera.", @"Confirm", nil, nil); return; } // adjust progressbar min/max [progressBar setMinValue: 0]; if (!deleteFiles) { [progressBar setMaxValue: [files count]]; } else { // add 1/4 for deleting [progressBar setMaxValue: ([files count] + ([files count] * 0.25))]; } // detach a thread that downloads the files threadParams = [[NSMutableDictionary alloc] initWithCapacity: 0]; [threadParams setObject: downloadPath forKey: DOWNLOAD_PATH]; [threadParams setObject: [self selectedCamera] forKey: CAMERA]; [threadParams setObject: files forKey: FILES_TO_DOWNLOAD]; [threadParams setObject: [NSNumber numberWithBool: deleteFiles] forKey: DELETE_FILES]; [threadParams setObject: [NSNumber numberWithBool: YES] forKey: GOTO_DOWNLOAD_LOCATION]; [self setDownloadIsActive: YES]; [NSThread detachNewThreadSelector: @selector(_downloadFiles:) toTarget: self withObject: threadParams]; // the user can now abort the download [transferButton setTitle: @"Abort"]; } /* * Abort the currently running download. If no * download is active, nothing happens. */ - (void) abortDownloadFiles: (id)sender { [transferButton setEnabled: NO]; // will be re-enabled by downloadFinished [self setDownloadIsActive: NO]; } /* * If no download is active, this method will intiate one. * Otherwise, the active download will be aborted. */ - (void) initiateOrAbortDownload: (id)sender { if (![self downloadIsActive]) { [self initiateDownloadFiles: sender]; } else { [self abortDownloadFiles: sender]; } } /* * Let the User select the destination directory * where the downloaded files should go into. */ - (void) setDestination: (id)sender { NSUserDefaults* defs = [NSUserDefaults standardUserDefaults]; id panel; id accessoryView; int answer; panel = [NSOpenPanel openPanel]; [panel setCanChooseDirectories: YES]; [panel setCanChooseFiles: NO]; [panel setAllowsMultipleSelection: NO]; [panel setTitle: @"Set download Destination"]; accessoryView = [OpenPanelAccessoryView accessoryView]; [accessoryView setUseTimestampeDirectory: [defs boolForKey: PREF_USE_TIMESTAMP_DIR]]; [panel setAccessoryView: accessoryView]; answer = [panel runModalForDirectory: [defs stringForKey: PREF_DOWNLOAD_BASE_PATH] file: nil types: nil]; if (answer == NSOKButton) { [defs setObject: [[panel filenames] objectAtIndex: 0] forKey: PREF_DOWNLOAD_BASE_PATH]; [defs setObject: [NSNumber numberWithBool: [accessoryView useTimestampDirectory]] forKey: PREF_USE_TIMESTAMP_DIR]; } } /* * Update the progress information about the * current download. Thumbnail may be nil * of not available for downloaded file. */ - (void) willDownloadFile: (DigitalCameraFile*)file at: (int)index of: (int)total thumbnail: (NSImage*)thumbnail { NSString* msg; msg = [NSString stringWithFormat: @"download %@ (%d of %d) ....", [file filename], index, total]; [progressInfoMsg setStringValue: msg]; NSLog(msg); if (thumbnail) { [thumbnailView setImage: thumbnail]; } [progressBar setDoubleValue: index]; } /* * Inform the controller the a file file will * be deleted from the camera. */ - (void) willDeleteFile: (DigitalCameraFile*)file at: (int)index of: (int)total { NSString* msg; msg = [NSString stringWithFormat: @"delete file %@ (%d of %d) ....", [file filename], index, total]; [progressInfoMsg setStringValue: msg]; NSLog(msg); [progressBar setDoubleValue: (total + (index * 0.25))]; } /* * Invoked when the download has finished. */ - (void) downloadFinished; { NSLog(@"download finished"); [self setDownloadIsActive: NO]; // TODO: reset all UI elements [progressInfoMsg setStringValue: @"download complete"]; [progressBar setDoubleValue: 0.0]; [transferButton setTitle: @"Download Files"]; [transferButton setEnabled: YES]; } @end @implementation CameraController(Private) /* * Download all files from the camera. This method * is intended to be used in a separate thread. The * controller is notified about the progress. */ - (void) _downloadFiles: (id)params { NSString* downloadPath = [params objectForKey: DOWNLOAD_PATH]; DigitalCamera* camera = [params objectForKey: CAMERA]; NSArray* files = [params objectForKey: FILES_TO_DOWNLOAD]; BOOL deleteFiles = [[params objectForKey: DELETE_FILES] boolValue]; BOOL gotoDownloadLocation = [[params objectForKey: GOTO_DOWNLOAD_LOCATION] boolValue]; NSEnumerator* e; DigitalCameraFile* aFile; NSImage* aThumbnail = nil; int counter; NSString* targetFile; NSAutoreleasePool* autoreleasePool; BOOL aborted; autoreleasePool = [[NSAutoreleasePool alloc] init]; NSAssert(downloadPath, @"no download path"); NSAssert(camera, @"no camera"); NSAssert(files, @"no files"); // download the files counter = 0; e = [files objectEnumerator]; while ((aFile = [e nextObject]) && [self downloadIsActive]) { counter++; if (WithThumbnails) { aThumbnail = [camera thumbnailForFile: aFile]; if (!aThumbnail) { aThumbnail = [self _defaultThumbnail]; } } [self willDownloadFile: aFile at: counter of: [files count] thumbnail: aThumbnail]; targetFile = [downloadPath stringByAppendingPathComponent: [aFile filename]]; targetFile = [self _getUnusedFilenameBasedOn: targetFile]; [camera downloadFile: aFile to: targetFile]; } // delete files if requested if (deleteFiles) { counter = 0; e = [files objectEnumerator]; while ((aFile = [e nextObject]) && [self downloadIsActive]) { counter++; [self willDeleteFile: aFile at: counter of: [files count]]; [camera deleteFile: aFile]; } } aborted = ![self downloadIsActive]; [self downloadFinished]; // open the download location in workspace (if not aborted) if (!aborted && gotoDownloadLocation) { [[NSWorkspace sharedWorkspace] noteFileSystemChanged]; [[NSWorkspace sharedWorkspace] selectFile: downloadPath inFileViewerRootedAtPath: [downloadPath stringByDeletingLastPathComponent]]; } RELEASE(autoreleasePool); } /* * Returns a default image that can be used instead * of a thumbnail. */ - (NSImage*) _defaultThumbnail { static NSImage* DefaultThumbnail = nil; if (!DefaultThumbnail) { NSLog(@"loading default thumbnail"); DefaultThumbnail = [NSImage imageNamed: @"no_thumbnail.jpg"]; [DefaultThumbnail setScalesWhenResized: NO]; RETAIN(DefaultThumbnail); } return DefaultThumbnail; } /* * Returns the base path to where images should * be downloaded. */ - (NSString*) _downloadBasePath { NSUserDefaults* defs = [NSUserDefaults standardUserDefaults]; NSString* basePath; BOOL useTimestampDir; NSCalendarDate* now; NSString* timestampDir; basePath = [defs stringForKey: PREF_DOWNLOAD_BASE_PATH]; useTimestampDir = [defs boolForKey: PREF_USE_TIMESTAMP_DIR]; if (useTimestampDir) { now = [NSCalendarDate calendarDate]; timestampDir = [NSString stringWithFormat: @"%4d%2d%2d", [now yearOfCommonEra], [now monthOfYear], [now dayOfMonth]]; basePath = [basePath stringByAppendingPathComponent: timestampDir]; basePath = [self _getUnusedFilenameBasedOn: basePath]; } return basePath; } /* * Ensures that a directory exists. If necessary, the * complete path will be created (like mkdir -p). */ - (void) _ensurePathExists: (NSString*)path { NSEnumerator* e; NSString* currentPath = @""; NSString* aPathComp; NSFileManager* fileman = [NSFileManager defaultManager]; BOOL success; e = [[path pathComponents] objectEnumerator]; while ((aPathComp = [e nextObject])) { currentPath = [currentPath stringByAppendingPathComponent: aPathComp]; if (![fileman fileExistsAtPath: currentPath]) { NSLog(@"directory %@ does not exist, create it", currentPath); success = [fileman createDirectoryAtPath: currentPath attributes: nil]; NSAssert(success, [@"Failed to create directory: " stringByAppendingString: currentPath]); } else { NSLog(@"directory %@ exists, good", currentPath); } } } /* * .... */ - (NSString*) _getUnusedFilenameBasedOn: (NSString*)filename { NSString* basename; NSString* basedir; NSString* extension; NSString* result; NSString* indexedBasename; int indexCounter = 1; NSFileManager* fileman = [NSFileManager defaultManager]; if (![fileman fileExistsAtPath: filename]) { return filename; } basedir = [filename stringByDeletingLastPathComponent]; basename = [[filename lastPathComponent] stringByDeletingPathExtension]; extension = [filename pathExtension]; do { indexedBasename = [NSString stringWithFormat: @"%@_%d", basename, indexCounter++]; result = [basedir stringByAppendingPathComponent: indexedBasename]; if ([extension length]) { result = [result stringByAppendingPathExtension: extension]; } } while ([fileman fileExistsAtPath: result]); return result; } @end camera-0.8.0/CameraInfo.plist0000644000175000017500000000145407777012325016646 0ustar gurkangurkan00000000000000{ ApplicationDescription = "Download files from your digital camera."; ApplicationIcon = "Camera.png"; ApplicationName = Camera; ApplicationRelease = 0.8; Authors = ("Stefan Kleine Stegemann"); Copyright = "Copyright \U00a9 2003 Stefan Kleine Stegemann"; CopyrightDescription = "Released under GPL"; FullVersionID = 0.8; URL = "http://mac.wms-network.de/gnustep/imageapps/camera/camera.html"; /* NSServices = ( { NSPortName = Camera; NSMessage = downloadFilesToPlace; NSSendTypes = (NSFilenamesPboardType); NSMenuItem = { default = "Camera/Download files to this directory"; German = "GNUMail/Dateien in dieses Verzeichnis laden"; }; } ); */ } camera-0.8.0/DigitalCamera.h0000644000175000017500000000226507756764673016446 0ustar gurkangurkan00000000000000 // created 11.2003 by Stefan Kleine Stegemann // // licensed under GPL #ifndef _H_DIGITAL_CAMERA #define _H_DIGITAL_CAMERA #include #include #include #include @class DigitalCameraFile; @interface DigitalCamera : NSObject { NSString* name; NSString* portName; // libgphoto stuff void* gpCamera; void* gpContext; } - (id) initWithName: (NSString*)_name atPort: (NSString*)_portName gpCamera: (void*)_gpCamera gpContext: (void*)_gpContext; - (void) dealloc; - (NSString*) name; - (NSString*) portName; - (NSArray*) availableFiles; - (NSImage*) thumbnailForFile: (DigitalCameraFile*)file; - (void) downloadFile: (DigitalCameraFile*)file to: (NSString*)destination; - (void) deleteFile: (DigitalCameraFile*)file; + (NSArray*) autodetectCameras; @end @interface DigitalCameraFile : NSObject { NSString* filename; NSString* folder; } - (id) initWithFilename: (NSString*)_filename inFolder: (NSString*)_folder onCamera: (DigitalCamera*)camera; - (void) dealloc; - (NSString*) filename; - (NSString*) folder; @end #endif camera-0.8.0/DigitalCamera.m0000644000175000017500000003000107756764673016440 0ustar gurkangurkan00000000000000 // created 11.2003 by Stefan Kleine Stegemann // // licensed under GPL #include "DigitalCamera.h" #include #include #include #include #include #include // some usefull macros #define CHECK_GP(result) if (result < 0) { GPError(result); return; } #define CHECK_GP_RV(result) if (result < 0) { GPError(result); return nil; } #define CHECK_GP_RNULL(result) if (result < 0) { GPError(result); return NULL; } #define CHECK_PORT(result) if (result < 0) { GPPortError(result); return; } #define CHECK_PORT_RV(result) if (result < 0) { GPPortError(result); return nil; } /* * Functions. */ void ShowGPError(int result, const char *msg) { // TODO: localize this //NSRunAlertPanel(@"Error while interacting with camera!", // [NSString stringWithFormat: @"%s (Errorcode: %d)", msg, result], // @"Confirm", nil, nil); NSLog(@"Error while interacting with camera: %s (Error: %d)", msg, result); } void GPError(int result) { ShowGPError(result, gp_result_as_string(result)); } void GPPortError(int result) { ShowGPError(result, gp_port_result_as_string(result)); } static GPContext* globalGPContext = 0; GPContext* GetGPContext() { if (globalGPContext == 0) { globalGPContext = gp_context_new(); // TODO: globalGPContext has to be unref-ed somewhere } return globalGPContext; } /* * Non-Public methods. */ @interface DigitalCamera(Private) - (void) _collectFilesIntoArray: (NSMutableArray*)array startingAtFolder: (NSString*)folder; - (Camera*) _gpCamera; - (GPContext*) _gpContext; - (NSString*) _temporaryThumbnailFileFor: (NSString*)filename; - (CameraFile*) _createGPFile: (DigitalCameraFile*)file ofType: (CameraFileType)fileType; @end /* * An instance of this class represents a connection to * a camera that is connected to your system. Use * autodetectCameras to get a list with all available * cameras. */ @implementation DigitalCamera /* * Designated initializer. Creates a new camera at * a specific port. */ - (id) initWithName: (NSString*)_name atPort: (NSString*)_portName gpCamera: (void*)_gpCamera gpContext: (void*)_gpContext { if ((self = [super init])) { name = [_name copy]; portName = [_portName copy]; gpContext = _gpContext; gp_context_ref([self _gpContext]); gpCamera = _gpCamera; gp_camera_ref([self _gpCamera]); } return self; } - (void) dealloc { RELEASE(name); RELEASE(portName); gp_camera_unref([self _gpCamera]); gp_context_unref([self _gpContext]); [super dealloc]; } /* * Get the name of this camera. */ - (NSString*) name { return name; } /* * Get the name of the port to which this camera is connected. */ - (NSString*) portName { return portName; } /* * Get all files that are available on this camera. * This method walks through all folders recursively * and returns all files found. The returned array is * autoreleased. The array contains elements of the * type DigitalCameraFile, each element is retained only * by the array itself. If this method fails, it * returns nil. */ - (NSArray*) availableFiles { NSMutableArray* files = [[NSMutableArray alloc] initWithCapacity: 0]; [self _collectFilesIntoArray: files startingAtFolder: @"/"]; AUTORELEASE(files); return files; } /* * Get a thumbnail image for a file on the camera. The * returned image is autoreleased. * Returns nil if a thumbnail is not available for the * specified file. */ - (NSImage*) thumbnailForFile: (DigitalCameraFile*)file { CameraFile* thumbFile; NSString* tempFile; NSFileManager* fileMan = [NSFileManager defaultManager]; NSImage* thumbnail = nil; NSAssert(file, @"file is nil"); thumbFile = [self _createGPFile: file ofType: GP_FILE_TYPE_PREVIEW]; tempFile = [self _temporaryThumbnailFileFor: [file filename]]; NSLog(@"Saving Thumbnail for %@/%@ to %@", [file folder], [file filename], tempFile); CHECK_GP_RV(gp_file_save(thumbFile, [tempFile cString])); gp_file_unref(thumbFile); NSAssert([fileMan fileExistsAtPath: tempFile], @"file with thumbnail not found"); // this is a temporary workaround to disable // thumbnails on systems that use wraster for // jpeg processing. this is not multi-thread- // capable. thumbnail = [[NSImage alloc] initWithContentsOfFile: tempFile]; AUTORELEASE(thumbnail); if (![fileMan removeFileAtPath: tempFile handler: nil]) { NSLog(@"cannot remove temporary file %@", tempFile); } return thumbnail; } /* * Downloads a file from the camera to the speicified * destination. */ - (void) downloadFile: (DigitalCameraFile*)file to: (NSString*)destination { CameraFile* camFile; NSAssert(file, @"file is nil"); //NSAssert([[NSFileManager defaultManager] isWritableFileAtPath: destination], // @"cannot write to destination"); camFile = [self _createGPFile: file ofType: GP_FILE_TYPE_NORMAL]; NSLog(@"Saving file %@/%@ to %@", [file folder], [file filename], destination); CHECK_GP(gp_file_save(camFile, [destination cString])); gp_file_unref(camFile); } /* * Deletes a file on the camera. */ - (void) deleteFile: (DigitalCameraFile*)file { NSAssert(file, @"file is nil"); NSLog(@"Deleting file %@/%@", [file folder], [file filename]); gp_camera_file_delete([self _gpCamera], [[file folder] cString], [[file filename] cString], [self _gpContext]); } /* * Detects all available cameras. The returned array * is autoreleased. The contained objects are retained * only by the array itself. This method returns nil if * an error occured. */ + (NSArray*) autodetectCameras { CameraList* cameras; CameraAbilitiesList* abilities; Camera* cam; CameraAbilities camAbilities; GPPortInfoList* portInfos; GPPortInfo portInfo; NSMutableArray* result; int camCount, i, m; const char* lname; const char* lval; DigitalCamera* aCamera; CHECK_GP_RV(gp_list_new(&cameras)); CHECK_GP_RV(gp_abilities_list_new(&abilities)); CHECK_GP_RV(gp_abilities_list_load(abilities, GetGPContext())); CHECK_PORT_RV(gp_port_info_list_new(&portInfos)); CHECK_PORT_RV(gp_port_info_list_load(portInfos)); CHECK_GP_RV(gp_abilities_list_detect(abilities, portInfos, cameras, GetGPContext())); camCount = gp_list_count(cameras); if (camCount > 0) { result = [[NSMutableArray alloc] initWithCapacity: camCount]; AUTORELEASE(result); for (i = 0; i < camCount; i++) { CHECK_GP_RV(gp_camera_new(&cam)); CHECK_GP_RV(gp_list_get_name(cameras, i, &lname)); CHECK_GP_RV(gp_list_get_value(cameras, i, &lval)); CHECK_GP_RV((m = gp_abilities_list_lookup_model(abilities, lname))); CHECK_GP_RV(gp_abilities_list_get_abilities(abilities, m, &camAbilities)); //CHECK_GP_RV(gp_camera_set_abilities(cam, camAbilities)); CHECK_GP_RV((m = gp_port_info_list_lookup_path(portInfos, lval))); CHECK_GP_RV(gp_port_info_list_get_info(portInfos, m, &portInfo)); CHECK_GP_RV(gp_camera_set_port_info(cam, portInfo)); aCamera = [[DigitalCamera alloc] initWithName: [NSString stringWithCString: lname] atPort: [NSString stringWithCString: lval] gpCamera: cam gpContext: GetGPContext()]; //CHECK_GP_RV(gp_camera_unref(cam)); AUTORELEASE(aCamera); [result addObject: aCamera]; } } else { // TODO: localize this NSRunAlertPanel(@"No Camera found!", @"No digital camera could be detected on your system.", @"Confirm", nil, nil); result = nil; } CHECK_GP_RV(gp_abilities_list_free(abilities)); CHECK_GP_RV(gp_port_info_list_free(portInfos)); CHECK_GP_RV(gp_list_free(cameras)); return result; } @end @implementation DigitalCamera(Private) - (void) _collectFilesIntoArray: (NSMutableArray*)array startingAtFolder: (NSString*)folder { CameraList* list; int count, i; const char* lname; NSString* subfolder; DigitalCameraFile* aFile; NSLog(@"collecting files in folder %@", folder); // list all files in start folder CHECK_GP(gp_list_new(&list)); CHECK_GP(gp_camera_folder_list_files([self _gpCamera], [folder cString], list, [self _gpContext])); count = gp_list_count(list); for (i = 0; i < count; i++) { CHECK_GP(gp_list_get_name(list, i, &lname)); // TODO: create file info object and add to array aFile = [[DigitalCameraFile alloc] initWithFilename: [NSString stringWithCString: lname] inFolder: folder onCamera: self]; [array addObject: aFile]; AUTORELEASE(aFile); } CHECK_GP(gp_list_free(list)); // recurse through subfolders of the start folder CHECK_GP(gp_list_new(&list)); CHECK_GP(gp_camera_folder_list_folders([self _gpCamera], [folder cString], list, [self _gpContext])); count = gp_list_count(list); for (i = 0; i < count; i++) { CHECK_GP(gp_list_get_name(list, i, &lname)); if ([folder isEqualToString: @"/"]) { // first level under root folder subfolder = [NSString stringWithFormat: @"/%s", lname]; } else { subfolder = [NSString stringWithFormat: @"%@/%s", folder, lname]; } [self _collectFilesIntoArray: array startingAtFolder: subfolder]; } CHECK_GP(gp_list_free(list)); } - (Camera*) _gpCamera { return (Camera*)gpCamera; } - (GPContext*) _gpContext { return (GPContext*)gpContext; // TODO } - (NSString*) _temporaryThumbnailFileFor: (NSString*)filename { NSFileManager* fileman = [NSFileManager defaultManager]; NSString* tmpPath = [(NSString*)NSTemporaryDirectory() stringByAppendingPathComponent: @"dc_thumbnails"]; if (![fileman fileExistsAtPath: tmpPath]) { [fileman createDirectoryAtPath: tmpPath attributes: nil]; } NSAssert([fileman fileExistsAtPath: tmpPath], @"temporary thumbnail directory not found"); return [tmpPath stringByAppendingPathComponent: filename]; } - (CameraFile*) _createGPFile: (DigitalCameraFile*)file ofType: (CameraFileType)fileType { CameraFile* camFile; CHECK_GP_RNULL(gp_file_new(&camFile)); CHECK_GP_RNULL(gp_camera_file_get([self _gpCamera], [[file folder] cString], [[file filename] cString], fileType, camFile, [self _gpContext])); return camFile; } @end /* ----------------------------------------------------------------------- */ /* * A file that exists on a particular Camera. */ @implementation DigitalCameraFile - (id) initWithFilename: (NSString*)_filename inFolder: (NSString*)_folder onCamera: (DigitalCamera*)camera { if ((self = [super init])) { filename = [_filename copy]; folder = [_folder copy]; // TODO: obtain more detailed information(s) } return self; } - (void) dealloc { [filename release]; [folder release]; [super dealloc]; } - (NSString*) filename { return filename; } - (NSString*) folder { return folder; } @end camera-0.8.0/GNUmakefile0000644000175000017500000000206707775070020015632 0ustar gurkangurkan00000000000000# # GNUmakefile - Generated by ProjectCenter # Written by Philippe C.D. Robert # # NOTE: Do NOT change this file -- ProjectCenter maintains it! # # Put all of your customisations in GNUmakefile.preamble and # GNUmakefile.postamble # include $(GNUSTEP_MAKEFILES)/common.make # # Subprojects # # # Main application # PACKAGE_NAME=Camera APP_NAME=Camera GNUSTEP_INSTALLATION_DIR=$(GNUSTEP_LOCAL_ROOT)/ Camera_APPLICATION_ICON=Camera.png Camera_MAIN_MODEL_FILE=Camera.gorm # # Additional libraries # ADDITIONAL_GUI_LIBS += # # Resource files # Camera_RESOURCE_FILES= \ Camera.gorm \ CameraInfo.plist \ Images/* # # Header files # Camera_HEADER_FILES= \ CameraController.h \ DigitalCamera.h \ OpenPanelAddons.h # # Class files # Camera_OBJC_FILES= \ main.m \ AppDelegate.m \ CameraController.m \ DigitalCamera.m \ OpenPanelAddons.m # # C files # Camera_C_FILES= -include GNUmakefile.preamble -include GNUmakefile.local include $(GNUSTEP_MAKEFILES)/aggregate.make include $(GNUSTEP_MAKEFILES)/application.make -include GNUmakefile.postamble camera-0.8.0/GNUmakefile.preamble0000644000175000017500000000020407756764673017436 0ustar gurkangurkan00000000000000ADDITIONAL_INCLUDE_DIRS += `gphoto2-config --cflags` ADDITIONAL_OBJCFLAGS += -g -Wall ADDITIONAL_GUI_LIBS += `gphoto2-config --libs`camera-0.8.0/OpenPanelAddons.h0000644000175000017500000000071007761467307016751 0ustar gurkangurkan00000000000000 // created 11.2003 by Stefan Kleine Stegemann // // licensed under GPL #ifndef _H_OPEN_PANEL_ADDONS #define _H_OPEN_PANEL_ADDONS #include #include #include @interface OpenPanelAccessoryView : NSView { NSButton* useTimestampDirectory; } - (id) init; + (OpenPanelAccessoryView*) accessoryView; - (void) setUseTimestampeDirectory: (BOOL)use; - (BOOL) useTimestampDirectory; @end #endif camera-0.8.0/OpenPanelAddons.m0000644000175000017500000000234107761467307016760 0ustar gurkangurkan00000000000000 // created 11.2003 by Stefan Kleine Stegemann // // licensed under GPL #include "OpenPanelAddons.h" /* * Accessory view for an open panel to let the user * select whether the downloaded files should be * placed in a timestamped directory. */ @implementation OpenPanelAccessoryView - (id) init { if ((self = [super initWithFrame: NSMakeRect(0, 0, 0, 0)])) { useTimestampDirectory = [[NSButton alloc] initWithFrame: [self frame]]; [useTimestampDirectory setTitle: @"place files in timestamped directory"]; [useTimestampDirectory setButtonType: NSSwitchButton]; [self addSubview: AUTORELEASE(useTimestampDirectory)]; [useTimestampDirectory sizeToFit]; [self setFrame: [useTimestampDirectory frame]]; } return self; } /* * Factory method for convinience. The width of the accessory * view is adjusted to the width of the specified panel. */ + (OpenPanelAccessoryView*) accessoryView { id view = [[OpenPanelAccessoryView alloc] init]; return AUTORELEASE(view); } - (void) setUseTimestampeDirectory: (BOOL)use { [useTimestampDirectory setState: (use ? NSOnState : NSOffState)]; } - (BOOL) useTimestampDirectory { return ([useTimestampDirectory state] == NSOnState); } @end camera-0.8.0/README0000644000175000017500000000003507767276007014447 0ustar gurkangurkan00000000000000See Documentation directory. camera-0.8.0/main.m0000644000175000017500000000074607775067503014700 0ustar gurkangurkan00000000000000 // created 11.2003 by Stefan Kleine Stegemann // // licensed under GPL #include "AppDelegate.h" #include /* * Initialize and go! */ int main(int argc, const char *argv[]) { int apprc; AppDelegate* delegate; [NSApplication sharedApplication]; delegate = [[AppDelegate alloc] init]; [[NSApplication sharedApplication] setDelegate: delegate]; apprc = NSApplicationMain (argc, argv); [delegate release]; return apprc; } camera-0.8.0/Camera.gorm/0000755000175000017500000000000007777275263015730 5ustar gurkangurkan00000000000000camera-0.8.0/Camera.gorm/data.classes0000644000175000017500000000753607761467411020222 0ustar gurkangurkan00000000000000{ CameraController = { Actions = ( "detectCamera:", "initiateDownloadFiles:", "abortDownloadFiles:", "initiateOrAbortDownload:", "setDestination:" ); Outlets = ( deleteFilesAfterDownload, progressInfoMsg, progressBar, thumbnailView, transferButton, cameraInfo, window, cameraIcon, fileInfo ); Super = NSObject; }; FirstResponder = { Actions = ( "activateContextHelpMode:", "alignCenter:", "alignJustified:", "alignLeft:", "alignRight:", "arrangeInFront:", "cancel:", "capitalizeWord:", "changeColor:", "changeFont:", "checkSpelling:", "close:", "complete:", "copy:", "copyFont:", "copyRuler:", "cut:", "delete:", "deleteBackward:", "deleteForward:", "deleteToBeginningOfLine:", "deleteToBeginningOfParagraph:", "deleteToEndOfLine:", "deleteToEndOfParagraph:", "deleteToMark:", "deleteWordBackward:", "deleteWordForward:", "deminiaturize:", "deselectAll:", "fax:", "hide:", "hideOtherApplications:", "indent:", "loosenKerning:", "lowerBaseline:", "lowercaseWord:", "makeKeyAndOrderFront:", "miniaturize:", "miniaturizeAll:", "moveBackward:", "moveBackwardAndModifySelection:", "moveDown:", "moveDownAndModifySelection:", "moveForward:", "moveForwardAndModifySelection:", "moveLeft:", "moveRight:", "moveToBeginningOfDocument:", "moveToBeginningOfLine:", "moveToBeginningOfParagraph:", "moveToEndOfDocument:", "moveToEndOfLine:", "moveToEndOfParagraph:", "moveUp:", "moveUpAndModifySelection:", "moveWordBackward:", "moveWordBackwardAndModifySelection:", "moveWordForward:", "moveWordForwardAndModifySelection:", "newDocument:", "ok:", "openDocument:", "orderBack:", "orderFront:", "orderFrontColorPanel:", "orderFrontDataLinkPanel:", "orderFrontFontPanel:", "orderFrontHelpPanel:", "orderFrontStandardAboutPanel:", "orderFrontStandardInfoPanel:", "orderOut:", "pageDown:", "pageUp:", "paste:", "pasteAsPlainText:", "pasteAsRichText:", "pasteFont:", "pasteRuler:", "performClose:", "performMiniaturize:", "performZoom:", "print:", "raiseBaseline:", "revertDocumentToSaved:", "runPageLayout:", "runToolbarCustomizationPalette:", "saveAllDocuments:", "saveDocument:", "saveDocumentAs:", "saveDocumentTo:", "scrollLineDown:", "scrollLineUp:", "scrollPageDown:", "scrollPageUp:", "scrollViaScroller:", "selectAll:", "selectLine:", "selectNextKeyView:", "selectParagraph:", "selectPreviousKeyView:", "selectText:", "selectText:", "selectToMark:", "selectWord:", "showContextHelp:", "showGuessPanel:", "showHelp:", "showWindow:", "stop:", "subscript:", "superscript:", "swapWithMark:", "takeDoubleValueFrom:", "takeFloatValueFrom:", "takeIntValueFrom:", "takeObjectValueFrom:", "takeStringValueFrom:", "terminate:", "tightenKerning:", "toggle:", "toggleContinuousSpellChecking:", "toggleRuler:", "toggleToolbarShown:", "toggleTraditionalCharacterShape:", "transpose:", "transposeWords:", "turnOffKerning:", "turnOffLigatures:", "underline:", "unhide:", "unhideAllApplications:", "unscript:", "uppercaseWord:", "useAllLigatures:", "useStandardKerning:", "useStandardLigatures:", "yank:", "zoom:", "detectCamera:", "initiateDownloadFiles:", "abortDownloadFiles:", "initiateOrAbortDownload:", "setDestination:" ); Super = NSObject; }; }camera-0.8.0/Camera.gorm/objects.gorm0000644000175000017500000001316507761467411020244 0ustar gurkangurkan00000000000000GNUstep archive00002a8a:0000001d:000000b2:00000004:01GSNibContainer1NSObject01NSMutableDictionary1 NSDictionary&01NSString& % TextField01 NSTextField1 NSControl1NSView1 NSResponder% A B C A  C A&01 NSMutableArray1 NSArray&%01 NSTextFieldCell1 NSActionCell1NSCell0&%download informations01NSFont% A`&&&&&&&&%0 1NSColor0 &%NSNamedColorSpace0 &%System0 &%textBackgroundColor0  0& % textColor0&%ProgressIndicator01NSProgressIndicator% A B C A  C A&0 & ?UUUUUU @I @Y0& %  MenuItem101 NSMenuItem0&%Quit0&%q&&%01NSImage0&%common_2DCheckMark00& % common_2DDash2 terminate:v12@0:4@8%0&%NSOwner0& % NSApplication0& %  MenuItem200&%Hide0&%h&&%2 hide:v12@0:4@8%0 &%CameraController0!1 GSNibItem   &0"& %  MenuItem30#&%MenuItem0$& %  MenuItem40%& %  MenuItem50&& %  MenuItem60'0(& % Detect Camera0)&%d&&%%0*& %  MenuItem100+0,&%Info0-&&&%2submenuAction:%0.1NSMenu,0/ &0001& % Info Panel...02&&&%2 orderFrontStandardInfoPanel:v12@0:4@8%0304&%Preferences...05&&&%%0607&%Camera08 &+090:&%Set Destination0;&%o&&%%'0<& %  MenuItem7+0=&% Button20>1NSButton% B A B A  B A&0? &%0@1 NSButtonCell0A&% Download Files0B%&&&&&&&&%>0C&0D&&&&0E& %  MenuItem11+0F& %  MenuItem800G& %  MenuItem12+0H& %  MenuItem930I& %  MenuItem1390J& % GormNSMenu.0K&%GSCustomClassMap0L&0M& %  ImageView10N1 NSImageView% B C( C C   C C &0O &%0P1 NSImageCellB&&&&&&&&%%% ? ?0Q& % NSVisible0R &0S1NSWindow%  C Cʀ&% C Dn0T%  C Cʀ  C Cʀ&0U &0V% A C B` B`  B` B`&0W &%0XB&&&&&&&&%%% ? ?0Y% B C C\ A  C\ A& 0Z &%0[ 0\&%detected camera0]%0^&%BitstreamVeraSans-Bold A0A0&&&&&&&&%Y0_ 0`&%System0a&%textBackgroundColor0b `0c& % textColorN0d% B B CA A  CA A&0e &%0f0g&%Delete files after download0h0i&%common_SwitchOffB&&&&&&&&%d0j&0k&0l0m&%common_SwitchOn&&&>0n 0o&%System0p&%windowBackgroundColor0q&%Window0r&%Camerar ? B F@ F@%0s0t&%NSApplicationIcon0u& % ImageViewV0v&%Buttond0w& % CameraWindowS0x& %  TextField1Y0y&%NSMenu60z &%%0{1NSNibConnectorw0|&%NSOwner0}y|0~$y0%y000u0x0M00|0v01NSNibOutletConnectorv0&%deleteFilesAfterDownload00& % progressBar00&%progressInfoMsg0M0& % thumbnailView0x0& % cameraInfo0Gy0JG0FJ0HJ0w0&%window0u0& % cameraIcon0 v0&%deleteFilesAfterDownload0 u0& % cameraIcon0 w0&%window0 0&%progressInfoMsg0 0& % progressBar0 x0& % cameraInfo0 M0& % thumbnailView0=|01NSNibControlConnector= 0&%initiateOrAbortDownload:0 =0&%transferButton0&y0& 0& % detectCamera:0Iy0I 0&%setDestination:camera-0.8.0/Documentation/0000755000175000017500000000000007777275263016406 5ustar gurkangurkan00000000000000camera-0.8.0/Documentation/COPYING0000644000175000017500000004307607767275700017446 0ustar gurkangurkan00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02111, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02111, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. camera-0.8.0/Documentation/INSTALL0000644000175000017500000000204007767275700017426 0ustar gurkangurkan00000000000000############################# ##### Camera DEPENDS ######## ############################# GNUstep - gnustep-make - gnustep-base (Foundation Kit) - gnustep-gui (Application Kit) see http://www.gnustep.org Camera requires the latest version of gnustep-gui with wraster-independant image loading. Otherwise you cannot display thumbnails during download (Camera will segfault because the usage of wraster inside GNUstep is not threadsafe). If you do not have or do not want to install the latest version, you can set the default WithThumbnails to NO. On the commandline type: defaults write Camera WithThumbnails 'NO' This will prevent Camera from displaying thumbnails. Installed and working version of libgphoto: see http://gphoto.sourceforge.net/proj/libgphoto2/ ############################## ########COMPILE ############## ############################## * From command line. first, make sure the gphoto2-config is in yout path unarchive Camera : gunzip -c Camera-X.Y.tar.gz | tar xvf - cd Camera-X-Y make make install (su or sudo if need) camera-0.8.0/Documentation/README0000644000175000017500000000114507776353060017256 0ustar gurkangurkan00000000000000 ------------ Camera 0.8 ------------ Camera is a simple application to download files from a digital camera. The files can be optionally deleted after download. During download, a thumbnail of the currently downloaded file is displayed. It is strongly recommended to read INSTALL for requirements before you try to build and install Camera. Bug reports, suggestions, code contributions etc. are welcome. Please send them me directly: Stefan Kleine Stegemann For more informations about Camera see the project homepage: http://mac.wms-network.de/gnustep/imageapps/camera/camera.html camera-0.8.0/English.lproj/0000755000175000017500000000000007777275263016313 5ustar gurkangurkan00000000000000camera-0.8.0/Images/0000755000175000017500000000000007777275263015002 5ustar gurkangurkan00000000000000camera-0.8.0/Images/Camera.png0000644000175000017500000001016707775070055016673 0ustar gurkangurkan00000000000000PNG  IHDR--j>bKGD X,IDATx[HYd%P˖Pɢ aZ!#9\7T d`G :<pݠ0 t'!ʺ ʹP-tݦxXǴYխFL4~~~pƶqN7-ҹsUoiUt% rFŲ "'q [ oXN*I7:`[EP:3jFk>O{NA0zyey'r]9v9Ќ{=[ *@:?b_ *uHU?l~V/ޒE7'sc@dэ 7 r{mxgjk;-;s68G 3O=[Yz0$7+/́Cw/B*T-)d0ןg͉~Pm;saa&,S^{yJM5: :|Sf6gz7TGGkQmuzΒgu0SiemV'G~दNƙ-kr%Epc`ѪfǀF/fNmet|"+DZ-2rIEpmj~[ezt-E`"ɍF+ClP-#lmm79?>[}!Q$ul}ց6\|b y9WO2''~=&V(/@bmcvfb1` k/ÌQ;rk_"'O%^C;ѿ9 66TV:VځtJ{IIkigSse#dkG-c.* кQ/)poTQAfOco`+rt cբ/㣓Eb8+tĉ@~}f08-I@OؓMwt3J9i2Ln8"vlc72"ԍk"c@֗W;`(A&Ɉ? &!"E-2Z`bω\35!>!jPUׂ[{gT9ݜ3R!GGl¥u5/_Vu % ]gzL ğşşf)$%tm.vbիWm@nMDA>3+nJ>Eggt:j,A `Fh^5Z1qBi‰h-2?-tԏ~޴s=y]l= ^ڔEyqF/YmМ!~?HDZp_W>`}0>ST<X2~PZoZҀsy!فh:nvL*0v}u JnS|˸mH"hR6thS8JH"E9":s eC 2998i `+y;'dV;V;3-r`А97!Ì1lY ptjqt6*2 m0*|"dKv3>`FVځR0N7j\Һ@PDT,xV] `Nje zg>s/0y僿 twγ'/ ,]o{$:Mve-/M@rc1,jB6M 1Y 8kWwԗ~m9馵t55Ore51zT-IkhҮxIez pο>ES5UKm?H56Z/^Y59 r/gۤBeAQ5P7Ƴ* L \1P}}$YH d!qQ|\ZMw'[1 L*`pP4 e yW+:qǡ8JwvqCʴ _a;noy7,^{tHc׍]SǮ|qcQvާGqj4?޾+l$!(j߼E^>9Ila^d&fu]-|@/$̍H.`F ՌSKH]x1eIJwRѵllvN*EֿJ]?ϗKg3BFQ0kxth0r O}#]en@5e~wad&(RTc'ƛB0F5G6-k&k~X,A%tmN x2Ϣ߬`Ø퀨Iڥu:I4I5tV͒lƌl%Uor@ޟd|.#**Gt~aVx,ܫޡJ*BX`33t6$*V,28^GftX2EnE"@>ݛ0Ae4赟W:r3L]Z鬾=:?i/zr])SY1z}XDMv.BxFV;;!j f|d_}Z{^f}r|1@lgybkY ~_QFnCLWHbXlay޹Wtw.,:33Jz 6x#vsl炻$m6\Rq/8q  3&I%Upa9΃w4-B4 r^ aў40|as{7Te<,RT9F3+u?C鼟 F!FP=",M*,@g. 5[v̂=8&Mwv `Ef7pCmEJI;]R y1H$#Wʩ2`Gs\ F/m G3s팭7tfF 2f ص'sXK 7/j4pnl!EJǓXd*?c6;f4h@z^9i@ -j’ԯ $,Ut󗴡Yjb(-vƜ,9k 5O([7)cp~ at]t2et 3cRƣ=F_;RѼʜ5ie@'[Y5,Rdbk1ktZ.Ee nxD0S)Z|  Z>-(]uֵ)HWvyMw]k2_e0XPh&ny3NFg7{k  2hAܑ  jI,0U6, 6 xe^"iEMҪk.aӉiteLóֲ)ӣia{ݎk-rb4ʖoChƉ {!qV{<ۉA%*V x3 *KÞBƶ 0ͦGc+z;,V&4gIENDB`camera-0.8.0/Images/no_thumbnail.jpg0000644000175000017500000000436607761467307020167 0ustar gurkangurkan00000000000000JFIFHHCreated with The GIMPCC"  #  ?DDD@DDD@DDD@DDD@DDD@DDD@DDD@DDD@DDD@DDD@DDD@DDD@DDD@DDD@DDD@DDD@DDD@DDD@DDc[ ow[.Om_>jUFߣX`C#w菒 ]7a_UP+HnZtv>IpRV_ͧGv~>EJd7tb?/}!W5Ŗ͹ng Nr85ZJmw4[ŬЧ>NN%YX!H~$w!-~0>R%y'wZ>y&Hr~ 2' { `ɱ "~O:@m6[,f/u-/Ͷf󇏿ReP^'t~|ZbΥ$Gc݁.GwtԞY k̉ܽ}PmƋI XG9D4FDž7dY<Z{>-ښG/t,2ϩ" &ܬ#l0cEaGqPrʿ.? w8+&F-̦Y;鷆c`NfH` vml9:U3댹[%)_9E%XNVc±N󏜍CNl,&i%9fVTt _Ք}Gp~u=Ɵ~g<oP F)fxto$grzPjLD |c&> k ۰Z᧸,&:`R,~p{7_츗`&1苒aмTɼZٵh=z7ig`K_S YND(/O܏}7yuO\Ng:YW8{$(VsYGN՘h"dKG9HKʞ?//xw^qXL;T~!>'ԾF8dTi_;mxU^bEwD_8Kb-=_Q4(]eGT*bÙa7yཿ}^]d@[ ;ߪʮ{%k+uhÌ,^KD8pa.%׋@llLƴ6:'92`܎g G K{cxrL=F~#};$g֔~ve֫W.Key[,Qa62U-O1r %Pܝ{%lٟA4m;8'A-jH)c`噏=o<DNgyƾ@q1/AAcamera-0.8.0/configure-stamp0000644000175000017500000000000010110730026016551 0ustar gurkangurkan00000000000000camera-0.8.0/build-stamp0000644000175000017500000000000010110730036015670 0ustar gurkangurkan00000000000000