![]() |
IOS Streaming Browser 1.0
An IOS streaming browser to stream the display to others or to a projector
|
#import <HTTPDynamicFileResponse.h>
Public Member Functions | |
(id) | - initWithFilePath:forConnection:separator:replacementDictionary: |
Protected Attributes | |
NSData * | separator |
NSDictionary * | replacementDict |
This class is designed to assist with dynamic content. Imagine you have a file that you want to make dynamic:
<html> <body>
... System Time: SysTime </body> </html>
Now you could generate the entire file in Objective-C, but this would be a horribly tedious process. Beside, you want to design the file with professional tools to make it look pretty.
So all you have to do is escape your dynamic content like this:
...
... System Time: %SysTime%%
And then you create an instance of this class with:
This class will then perform the replacements for you, on the fly, as it reads the file data. This class is also asynchronous, so it will perform the file IO using its own GCD queue.
Definition at line 38 of file HTTPDynamicFileResponse.h.
- (id) initWithFilePath: | (NSString *) | fpath | |
forConnection: | (HTTPConnection *) | parent | |
separator: | (NSString *) | separatorStr | |
replacementDictionary: | (NSDictionary *) | dict | |
Initialize the HTTPDyanmicFileResponse param NSString param HTTPConnection param NSString param NSDictionary returns id
Initialize the HTTPDynamicFileResponse with a file path for a specific connection, separator string, and dictionary param NSSTring param HTTPConnection param NSString param NSDictionary returns id
Definition at line 20 of file HTTPDynamicFileResponse.m.
:(NSString *)fpath forConnection:(HTTPConnection *)parent separator:(NSString *)separatorStr replacementDictionary:(NSDictionary *)dict { if ((self = [super initWithFilePath:fpath forConnection:parent])) { // Sets the separator string separator = [[separatorStr dataUsingEncoding:NSUTF8StringEncoding] retain]; // Sets the replacement dictionary replacementDict = [dict retain]; } return self; }
- (NSDictionary*) replacementDict [protected] |
Definition at line 48 of file HTTPDynamicFileResponse.h.
separator string
Definition at line 43 of file HTTPDynamicFileResponse.h.