IOS Streaming Browser 1.0
An IOS streaming browser to stream the display to others or to a projector

/Users/willrubel/IOS-Streaming-Browser/IOS-Streaming-Browser/HTTPMessage.h

Go to the documentation of this file.
00001 /**
00002  * The HTTPMessage class is a simple Objective-C wrapper around Apple's CFHTTPMessage class.
00003 **/
00004 
00005 #import <Foundation/Foundation.h>
00006 
00007 #if TARGET_OS_IPHONE
00008   // Note: You may need to add the CFNetwork Framework to your project
00009   #import <CFNetwork/CFNetwork.h>
00010 #endif
00011 
00012 #define HTTPVersion1_0  ((NSString *)kCFHTTPVersion1_0)
00013 #define HTTPVersion1_1  ((NSString *)kCFHTTPVersion1_1)
00014 
00015 
00016 @interface HTTPMessage : NSObject
00017 {
00018     /**
00019         message can be request or response
00020     **/
00021         CFHTTPMessageRef message; 
00022 }
00023 
00024 
00025 /**
00026     returns self as an empty HTTP message
00027  **/
00028 - (id)initEmptyRequest;
00029 
00030 /**
00031     Initialize a request HTTPMessage with a URL and version
00032     param NSString
00033     param NSURL
00034     param NSString
00035     returns id - self (HTTPMessage)
00036  **/
00037 - (id)initRequestWithMethod:(NSString *)method URL:(NSURL *)url version:(NSString *)version;
00038 
00039 /**
00040      Initialize a response HTTPMessage with a code, description, and version
00041     param NSString
00042     param NSString
00043     param NSString
00044     returns id 
00045 **/
00046 - (id)initResponseWithStatusCode:(NSInteger)code description:(NSString *)description version:(NSString *)version;
00047 
00048 /**
00049     Returns whether can appendData with data
00050     param NSData
00051 **/
00052 - (BOOL)appendData:(NSData *)data;
00053 
00054 /**
00055     Returns whether the header is complete
00056  **/
00057 - (BOOL)isHeaderComplete;
00058 
00059 /**
00060     Gets the version
00061  **/
00062 - (NSString *)version;
00063 
00064 /**
00065     Gets the method
00066  **/
00067 - (NSString *)method;
00068 
00069 /**
00070     Gets the url
00071  **/
00072 - (NSURL *)url;
00073 
00074 /**
00075     Gets the status code
00076  **/
00077 - (NSInteger)statusCode;
00078 
00079 /**
00080     Gets all the header fields wrapped in an NSDictionary object
00081  **/
00082 - (NSDictionary *)allHeaderFields;
00083 
00084 /**
00085     Returns the header field as a string
00086     param NSString
00087     returns NSString
00088 **/
00089 - (NSString *)headerField:(NSString *)headerField;
00090 
00091 /**
00092     Sets the header field
00093     param NSString
00094     param NSString
00095 **/
00096 - (void)setHeaderField:(NSString *)headerField value:(NSString *)headerFieldValue;
00097 
00098 /**
00099     Returns the message data
00100     returns NSData
00101 **/
00102 - (NSData *)messageData;
00103 
00104 /**
00105     Returns the body data
00106     returns NSData
00107 **/
00108 - (NSData *)body;
00109 
00110 /**
00111     Set the body data
00112     param NSData
00113 **/
00114 - (void)setBody:(NSData *)body;
00115 
00116 @end
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Defines