forked from erkyrath/Inform7-IDE-Mac
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIFWebUriProtocol.h
30 lines (25 loc) · 1.12 KB
/
IFWebUriProtocol.h
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
//
// IFWebUriHandler.h
// Inform
//
// Created by Andrew Hunter on 28/04/2012.
// Copyright (c) 2012 Andrew Hunter. All rights reserved.
//
#import <Foundation/Foundation.h>
///
/// NSURLProtocol handler that supplies the runtime:// URL protocol used to run the game in a browser window
///
/// Individual projects need to (de)register a path in order to have a unique address. A limitation of NSURLProtocol
/// is that it is system-wide, so there's no way to have individual handlers for different web views.
///
@interface IFWebUriProtocol : NSURLProtocol {
NSURLRequest* m_Request; // The URL request for this object
NSCachedURLResponse* m_CachedResponse; // The cached response for this request
id<NSURLProtocolClient> m_Client; // The client for this request
}
/// Registers a game folder at the specified path. Returns the URL that can be used to access it
+ (NSURL*) registerFolder: (NSString*) name
atPath: (NSURL*) path;
/// Unregisters a URL registered by registerFolder
+ (void) deregisterFolder: (NSURL*) prefixUrl;
@end