1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
// 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
|