1 /* 2 * Copyright (C) 2003 Stefan Kleine Stegemann 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 2 7 * of the License, or (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 */ 18 19 #ifndef _H_CAMERA_CONTROLLER 20 #define _H_CAMERA_CONTROLLER 21 22 #include <Foundation/NSObject.h> 23 #include <Foundation/NSString.h> 24 #include <Foundation/NSLock.h> 25 #include <AppKit/NSImage.h> 26 27 #include "DigitalCamera.h" 28 29 extern NSString* PREF_DOWNLOAD_BASE_PATH; 30 extern NSString* PREF_USE_TIMESTAMP_DIR; 31 32 33 @interface CameraController : NSObject 34 { 35 DigitalCamera* selectedCamera; 36 BOOL downloadIsActive; 37 38 // Outlets 39 id deleteFilesAfterDownload; 40 id progressInfoMsg; 41 id progressBar; 42 id thumbnailView; 43 id transferButton; 44 id cameraInfo; 45 id cameraIcon; 46 id window; 47 } 48 49 - (id) init; 50 - (void) dealloc; 51 52 - (void) awakeFromNib; 53 54 - (void) setSelectedCamera: (DigitalCamera*)aCamera; 55 - (DigitalCamera*) selectedCamera; 56 - (void) setDownloadIsActive: (BOOL)active; 57 - (BOOL) downloadIsActive; 58 59 // Notifications 60 - (void) willDownloadFile: (DigitalCameraFile*)file 61 at: (int)index 62 of: (int)total 63 thumbnail: (NSImage*)thumbnail; 64 65 - (void) willDeleteFile: (DigitalCameraFile*)file 66 at: (int)index 67 of: (int)total; 68 69 - (void) downloadFinished; 70 71 72 // Actions 73 - (void) detectCamera: (id)sender; 74 - (void) initiateDownloadFiles: (id)sender; 75 - (void) abortDownloadFiles: (id)sender; 76 - (void) initiateOrAbortDownload: (id)sender; 77 - (void) setDestination: (id)sender; 78 79 @end 80 81 #endif 82