-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathMYURLHandler.h
More file actions
30 lines (21 loc) · 841 Bytes
/
MYURLHandler.h
File metadata and controls
30 lines (21 loc) · 841 Bytes
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
//
// MYURLHandler.h
// MYUtilities
//
// Created by Jens Alfke on 3/15/12.
// Copyright (c) 2012 Jens Alfke. All rights reserved.
//
#import <Foundation/Foundation.h>
/** Utility for installing an AppleEvent handler that handles open-URL events. */
@interface MYURLHandler : NSObject
/** Installs a handler for open-URL ('GURL') AppleEvents.
The handler calls the application delegate's -openURL:error: method. */
+ (void) installHandler;
@end
@protocol MYURLHandlerDelegate <NSObject>
/** The NSApplication's delegate must implement this method.
@param url The URL that's been sent to the app to handle.
@param outError On failure, this should be set to an NSError describing the problem.
@return YES if the URL was handled, NO if it wasn't. */
- (BOOL) openURL: (NSURL*)url error: (NSError**)outError;
@end