![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /usr/share/doc/gnustep-base-doc/Base/Reference/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>NSURLProtocol class documentation</title> </head> <body> <font face="serif"> <a href="Base.html">Up</a> <br /> <h1><a name="title$NSURLProtocol">NSURLProtocol class documentation</a></h1> <h3>Authors</h3> <dl> <dt>Generated by Debian</dt> <dd> </dd> </dl> <div> <hr width="50%" align="left" /> <h3>Contents -</h3> <ol> <li> <a href="#001000000000">Software documentation for the NSURLProtocol class</a> </li> <li> <a href="#002000000000">Software documentation for the NSURLProtocol(Subclassing) category</a> </li> <li> <a href="#003000000000">Software documentation for the NSURLProtocolClient protocol</a> </li> </ol> <hr width="50%" align="left" /> </div> <h1><a name="001000000000"> Software documentation for the NSURLProtocol class </a></h1> <h2><a name="class$NSURLProtocol">NSURLProtocol</a> : <a rel="gsdoc" href="NSObject.html#class$NSObject">NSObject</a></h2> <blockquote class="declared"> <dl> <dt><b>Declared in:</b></dt> <dd>Foundation/NSURLProtocol.h</dd> </dl> </blockquote> <div class="availability"> <b>Availability:</b> MacOS-X 10.2.0, Base 1.13.0</div> <br /> <div class="desc"> </p> <p> Subclasses of NSURLProtocol implement basic handling of URL loading for specific protocols. The NSURLProtocol class itsself is a semi-abstract class giving the essential structure for the subclasses. </p> <p> </p> <p> You never instantiate NSURLProtocol yourself... it should only ever be done by other classes within the URL loading system. </p> <p> </div> <hr width="50%" align="left" /> <a href="#_NSURLProtocol_ivars">Instance Variables</a> <br/><br/> <b>Method summary</b> <ul> <li><a rel="gsdoc" href="NSURLProtocol.html#method$NSURLProtocol(Subclassing)+canInitWithRequest$">+canInitWithRequest:</a></li> <li><a rel="gsdoc" href="NSURLProtocol.html#method$NSURLProtocol(Subclassing)+canonicalRequestForRequest$">+canonicalRequestForRequest:</a></li> <li><a rel="gsdoc" href="NSURLProtocol.html#method$NSURLProtocol(Subclassing)+requestIsCacheEquivalent$toRequest$">+requestIsCacheEquivalent:toRequest:</a></li> <li><a rel="gsdoc" href="NSURLProtocol.html#method$NSURLProtocol(Subclassing)-startLoading">-startLoading</a></li> <li><a rel="gsdoc" href="NSURLProtocol.html#method$NSURLProtocol(Subclassing)-stopLoading">-stopLoading</a></li> <li><a rel="gsdoc" href="NSURLProtocol.html#method$NSURLProtocol+propertyForKey$inRequest$">+propertyForKey:inRequest:</a></li> <li><a rel="gsdoc" href="NSURLProtocol.html#method$NSURLProtocol+registerClass$">+registerClass:</a></li> <li><a rel="gsdoc" href="NSURLProtocol.html#method$NSURLProtocol+setProperty$forKey$inRequest$">+setProperty:forKey:inRequest:</a></li> <li><a rel="gsdoc" href="NSURLProtocol.html#method$NSURLProtocol+unregisterClass$">+unregisterClass:</a></li> <li><a rel="gsdoc" href="NSURLProtocol.html#method$NSURLProtocol-cachedResponse">-cachedResponse</a></li> <li><a rel="gsdoc" href="NSURLProtocol.html#method$NSURLProtocol-client">-client</a></li> <li><a rel="gsdoc" href="NSURLProtocol.html#method$NSURLProtocol-initWithRequest$cachedResponse$client$">-initWithRequest:cachedResponse:client:</a></li> <li><a rel="gsdoc" href="NSURLProtocol.html#method$NSURLProtocol-request">-request</a></li> </ul> <hr width="50%" align="left" /> <div class="method"> <h3><a name="method$NSURLProtocol+propertyForKey$inRequest$">propertyForKey: inRequest: </a></h3> + (id) <b>propertyForKey:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)key<b> inRequest:</b> (<a rel="gsdoc" href="NSURLRequest.html#class$NSURLRequest">NSURLRequest</a>*)request;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.2.0, Base 1.13.0</div> <br /> <div class="desc"> Allows subclasses to provide access to proptocol specific properties, returning the property of <var>request</var> stored by the name <var>key</var> or <code>nil</code> if no property had been stored using that <var>key</var> in the <var>request</var>. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURLProtocol+registerClass$">registerClass: </a></h3> + (BOOL) <b>registerClass:</b> (Class)protocolClass;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.2.0, Base 1.13.0</div> <br /> <div class="desc"> Registers the specified class so that it can be used to load requests. <br /> When the system is determining which class to use to handle a request it examines them in a most recently registered first order. <br /> The <a rel="gsdoc" href="#method$NSURLProtocol(Subclassing)+canInitWithRequest$"> +canInitWithRequest: </a> method is used to determine whether a class may be used to handle a particular request or not. Returns <code>YES</code> if registered (ie the class is an NSURLProtocol subclass), <code>NO</code> otherwise. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURLProtocol+setProperty$forKey$inRequest$">setProperty: forKey: inRequest: </a></h3> + (void) <b>setProperty:</b> (id)value<b> forKey:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)key<b> inRequest:</b> (<a rel="gsdoc" href="NSURLRequest.html#class$NSMutableURLRequest">NSMutableURLRequest</a>*)request;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.2.0, Base 1.13.0</div> <br /> <div class="desc"> Allows subclasses to provide a way to set protocol specific properties, setting the property named <var>key</var> to <var>value</var> in the <var>request</var>. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURLProtocol+unregisterClass$">unregisterClass: </a></h3> + (void) <b>unregisterClass:</b> (Class)protocolClass;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.2.0, Base 1.13.0</div> <br /> <div class="desc"> Unregisters a class which was previously registered using the <a rel="gsdoc" href="#method$NSURLProtocol+registerClass$"> +registerClass: </a> method. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURLProtocol-cachedResponse">cachedResponse </a></h3> - (<a rel="gsdoc" href="NSURLCache.html#class$NSCachedURLResponse">NSCachedURLResponse</a>*) <b>cachedResponse</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.2.0, Base 1.13.0</div> <br /> <div class="desc"> Returns the cachedResponse of the receiver. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURLProtocol-client">client </a></h3> - (id<<a rel="gsdoc" href="#protocol$(NSURLProtocolClient)">NSURLProtocolClient</a>>) <b>client</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.2.0, Base 1.13.0</div> <br /> <div class="desc"> Returns the client associated with the receiver. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURLProtocol-initWithRequest$cachedResponse$client$">initWithRequest: cachedResponse: client: </a></h3> - (id) <b>initWithRequest:</b> (<a rel="gsdoc" href="NSURLRequest.html#class$NSURLRequest">NSURLRequest</a>*)request<b> cachedResponse:</b> (<a rel="gsdoc" href="NSURLCache.html#class$NSCachedURLResponse">NSCachedURLResponse</a>*)cachedResponse<b> client:</b> (id<<a rel="gsdoc" href="#protocol$(NSURLProtocolClient)">NSURLProtocolClient</a>>)client;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.2.0, Base 1.13.0</div> <br /> <div class="desc"> Initialises the receiver with <var>request</var>, <var>cachedResponse</var> and <var>client</var>. <br /> The <var>cachedResponse</var> may be the result of a previous load of the <var>request</var> (in which case the protocol may validate and use it). <br /> The <var>client</var> is the object which receives messages about the progress of the load. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURLProtocol-request">request </a></h3> - (<a rel="gsdoc" href="NSURLRequest.html#class$NSURLRequest">NSURLRequest</a>*) <b>request</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.2.0, Base 1.13.0</div> <br /> <div class="desc"> Returns the request handled by the receiver. </div> <hr width="25%" align="left" /> </div> <a name="_NSURLProtocol_ivars"/> <br/><hr width="50%" align="left" /> <h2>Instance Variables for NSURLProtocol Class</h2> <h3><a name="ivariable$NSURLProtocol*_NSURLProtocolInternal">_NSURLProtocolInternal</a></h3> @protected void* <b>_NSURLProtocolInternal</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.2.0, Base 1.13.0</div> <br /> <div class="desc"> <em>Warning</em> the underscore at the start of the name of this instance variable indicates that, even though it is not technically <em>private</em>, it is intended for internal use within the package, and you should not use the variable in other code. </div> <hr width="25%" align="left" /> <br/><hr width="50%" align="left" /><br/> <h1><a name="002000000000"> Software documentation for the NSURLProtocol(Subclassing) category </a></h1> <h2><a rel="gsdoc" href="#class$NSURLProtocol">NSURLProtocol</a>(<a name="category$NSURLProtocol(Subclassing)">Subclassing</a>)</h2> <blockquote class="declared"> <dl> <dt><b>Declared in:</b></dt> <dd>Foundation/NSURLProtocol.h</dd> </dl> </blockquote> <div class="availability"> <b>Availability:</b> MacOS-X 10.2.0, Base 1.13.0</div> <br /> <div class="desc"> This category lists the methods which a subclass must implement in order to produce a working protocol. </div> <b>Method summary</b> <ul> <li><a rel="gsdoc" href="NSURLProtocol.html#method$NSURLProtocol(Subclassing)+canInitWithRequest$">+canInitWithRequest:</a></li> <li><a rel="gsdoc" href="NSURLProtocol.html#method$NSURLProtocol(Subclassing)+canonicalRequestForRequest$">+canonicalRequestForRequest:</a></li> <li><a rel="gsdoc" href="NSURLProtocol.html#method$NSURLProtocol(Subclassing)+requestIsCacheEquivalent$toRequest$">+requestIsCacheEquivalent:toRequest:</a></li> <li><a rel="gsdoc" href="NSURLProtocol.html#method$NSURLProtocol(Subclassing)-startLoading">-startLoading</a></li> <li><a rel="gsdoc" href="NSURLProtocol.html#method$NSURLProtocol(Subclassing)-stopLoading">-stopLoading</a></li> </ul> <hr width="50%" align="left" /> <div class="method"> <h3><a name="method$NSURLProtocol(Subclassing)+canInitWithRequest$">canInitWithRequest: </a></h3> + (BOOL) <b>canInitWithRequest:</b> (<a rel="gsdoc" href="NSURLRequest.html#class$NSURLRequest">NSURLRequest</a>*)request;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.2.0, Base 1.13.0</div> <br /> Subclasses <strong>must</strong> override this method.<br /> <div class="desc"> This method is called to decide whether a class can deal with the specified <var>request</var>. The abstract class implementation raises an exception. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURLProtocol(Subclassing)+canonicalRequestForRequest$">canonicalRequestForRequest: </a></h3> + (<a rel="gsdoc" href="NSURLRequest.html#class$NSURLRequest">NSURLRequest</a>*) <b>canonicalRequestForRequest:</b> (<a rel="gsdoc" href="NSURLRequest.html#class$NSURLRequest">NSURLRequest</a>*)request;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.2.0, Base 1.13.0</div> <br /> Subclasses <strong>must</strong> override this method.<br /> <div class="desc"> Returns the 'canonical' version of the <var>request</var>. <br /> The canonical form is used to look up requests in the cache by checking for equality. <br /> The abnstract class implementation simply returns <var>request</var>. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURLProtocol(Subclassing)+requestIsCacheEquivalent$toRequest$">requestIsCacheEquivalent: toRequest: </a></h3> + (BOOL) <b>requestIsCacheEquivalent:</b> (<a rel="gsdoc" href="NSURLRequest.html#class$NSURLRequest">NSURLRequest</a>*)a<b> toRequest:</b> (<a rel="gsdoc" href="NSURLRequest.html#class$NSURLRequest">NSURLRequest</a>*)b;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.2.0, Base 1.13.0</div> <br /> Subclasses <strong>must</strong> override this method.<br /> <div class="desc"> Compares two requests for equivalence for caching purposes. <br /> The abstract class implementaton just uses [NSObject -isEqual:] </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURLProtocol(Subclassing)-startLoading">startLoading </a></h3> - (void) <b>startLoading</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.2.0, Base 1.13.0</div> <br /> Subclasses <strong>must</strong> override this method.<br /> <div class="desc"> Starts loading of a request. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURLProtocol(Subclassing)-stopLoading">stopLoading </a></h3> - (void) <b>stopLoading</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.2.0, Base 1.13.0</div> <br /> Subclasses <strong>must</strong> override this method.<br /> <div class="desc"> Stops loading of a request (eg when the load is cancelled). </div> <hr width="25%" align="left" /> </div> <h1><a name="003000000000"> Software documentation for the NSURLProtocolClient protocol </a></h1> <h2><a name="protocol$(NSURLProtocolClient)">NSURLProtocolClient</a></h2> <blockquote class="declared"> <dl> <dt><b>Declared in:</b></dt> <dd>Foundation/NSURLProtocol.h</dd> </dl> </blockquote> <blockquote> <dl> <dt><b>Conforms to:</b></dt> <dd><a rel="gsdoc" href="NSObject.html#protocol$(NSObject)">NSObject</a></dd> </dl> </blockquote> <div class="availability"> <b>Availability:</b> MacOS-X 10.2.0, Base 1.13.0</div> <br /> <div class="desc"> Defines the API for NSURLProtocol loading </div> <b>Method summary</b> <ul> <li><a rel="gsdoc" href="NSURLProtocol.html#method$(NSURLProtocolClient)-URLProtocol$cachedResponseIsValid$">-URLProtocol:cachedResponseIsValid:</a></li> <li><a rel="gsdoc" href="NSURLProtocol.html#method$(NSURLProtocolClient)-URLProtocol$didCancelAuthenticationChallenge$">-URLProtocol:didCancelAuthenticationChallenge:</a></li> <li><a rel="gsdoc" href="NSURLProtocol.html#method$(NSURLProtocolClient)-URLProtocol$didFailWithError$">-URLProtocol:didFailWithError:</a></li> <li><a rel="gsdoc" href="NSURLProtocol.html#method$(NSURLProtocolClient)-URLProtocol$didLoadData$">-URLProtocol:didLoadData:</a></li> <li><a rel="gsdoc" href="NSURLProtocol.html#method$(NSURLProtocolClient)-URLProtocol$didReceiveAuthenticationChallenge$">-URLProtocol:didReceiveAuthenticationChallenge:</a></li> <li><a rel="gsdoc" href="NSURLProtocol.html#method$(NSURLProtocolClient)-URLProtocol$didReceiveResponse$cacheStoragePolicy$">-URLProtocol:didReceiveResponse:cacheStoragePolicy:</a></li> <li><a rel="gsdoc" href="NSURLProtocol.html#method$(NSURLProtocolClient)-URLProtocol$wasRedirectedToRequest$redirectResponse$">-URLProtocol:wasRedirectedToRequest:redirectResponse:</a></li> <li><a rel="gsdoc" href="NSURLProtocol.html#method$(NSURLProtocolClient)-URLProtocolDidFinishLoading$">-URLProtocolDidFinishLoading:</a></li> </ul> <hr width="50%" align="left" /> <div class="method"> <h3><a name="method$(NSURLProtocolClient)-URLProtocol$cachedResponseIsValid$">URLProtocol: cachedResponseIsValid: </a></h3> - (void) <b>URLProtocol:</b> (<a rel="gsdoc" href="#class$NSURLProtocol">NSURLProtocol</a>*)protocol<b> cachedResponseIsValid:</b> (<a rel="gsdoc" href="NSURLCache.html#class$NSCachedURLResponse">NSCachedURLResponse</a>*)cachedResponse;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.2.0, Base 1.13.0</div> <br /> <div class="desc"> Informs a client that a cached response is valid. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$(NSURLProtocolClient)-URLProtocol$didCancelAuthenticationChallenge$">URLProtocol: didCancelAuthenticationChallenge: </a></h3> - (void) <b>URLProtocol:</b> (<a rel="gsdoc" href="#class$NSURLProtocol">NSURLProtocol</a>*)protocol<b> didCancelAuthenticationChallenge:</b> (<a rel="gsdoc" href="NSURLAuthenticationChallenge.html#class$NSURLAuthenticationChallenge">NSURLAuthenticationChallenge</a>*)challenge;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.2.0, Base 1.13.0</div> <br /> <div class="desc"> Informs a client that an authentication <var>challenge</var> has been cancelled. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$(NSURLProtocolClient)-URLProtocol$didFailWithError$">URLProtocol: didFailWithError: </a></h3> - (void) <b>URLProtocol:</b> (<a rel="gsdoc" href="#class$NSURLProtocol">NSURLProtocol</a>*)protocol<b> didFailWithError:</b> (<a rel="gsdoc" href="NSError.html#class$NSError">NSError</a>*)error;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.2.0, Base 1.13.0</div> <br /> <div class="desc"> Informs a client that loading of a request has failed. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$(NSURLProtocolClient)-URLProtocol$didLoadData$">URLProtocol: didLoadData: </a></h3> - (void) <b>URLProtocol:</b> (<a rel="gsdoc" href="#class$NSURLProtocol">NSURLProtocol</a>*)protocol<b> didLoadData:</b> (<a rel="gsdoc" href="NSData.html#class$NSData">NSData</a>*)data;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.2.0, Base 1.13.0</div> <br /> <div class="desc"> Informs a client that <var>data</var> has been loaded. Only new <var>data</var> since the last call to this method must be provided. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$(NSURLProtocolClient)-URLProtocol$didReceiveAuthenticationChallenge$">URLProtocol: didReceiveAuthenticationChallenge: </a></h3> - (void) <b>URLProtocol:</b> (<a rel="gsdoc" href="#class$NSURLProtocol">NSURLProtocol</a>*)protocol<b> didReceiveAuthenticationChallenge:</b> (<a rel="gsdoc" href="NSURLAuthenticationChallenge.html#class$NSURLAuthenticationChallenge">NSURLAuthenticationChallenge</a>*)challenge;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.2.0, Base 1.13.0</div> <br /> <div class="desc"> Informs a client that an authentication <var>challenge</var> has been received. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$(NSURLProtocolClient)-URLProtocol$didReceiveResponse$cacheStoragePolicy$">URLProtocol: didReceiveResponse: cacheStoragePolicy: </a></h3> - (void) <b>URLProtocol:</b> (<a rel="gsdoc" href="#class$NSURLProtocol">NSURLProtocol</a>*)protocol<b> didReceiveResponse:</b> (<a rel="gsdoc" href="NSURLResponse.html#class$NSURLResponse">NSURLResponse</a>*)response<b> cacheStoragePolicy:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSURLCacheStoragePolicy">NSURLCacheStoragePolicy</a>)policy;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.2.0, Base 1.13.0</div> <br /> <div class="desc"> Informs a client that a <var>response</var> for the current load has been created. <br /> Also supplies the <var>policy</var> to be used for caching the <var>response</var>. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$(NSURLProtocolClient)-URLProtocol$wasRedirectedToRequest$redirectResponse$">URLProtocol: wasRedirectedToRequest: redirectResponse: </a></h3> - (void) <b>URLProtocol:</b> (<a rel="gsdoc" href="#class$NSURLProtocol">NSURLProtocol</a>*)protocol<b> wasRedirectedToRequest:</b> (<a rel="gsdoc" href="NSURLRequest.html#class$NSURLRequest">NSURLRequest</a>*)request<b> redirectResponse:</b> (<a rel="gsdoc" href="NSURLResponse.html#class$NSURLResponse">NSURLResponse</a>*)redirectResponse;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.2.0, Base 1.13.0</div> <br /> <div class="desc"> Informs a client that a redirect has occurred. <br /> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$(NSURLProtocolClient)-URLProtocolDidFinishLoading$">URLProtocolDidFinishLoading: </a></h3> - (void) <b>URLProtocolDidFinishLoading:</b> (<a rel="gsdoc" href="#class$NSURLProtocol">NSURLProtocol</a>*)protocol;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.2.0, Base 1.13.0</div> <br /> <div class="desc"> Informs a client that loading of a request has successfully finished. </div> <hr width="25%" align="left" /> </div> <br /> <a href="Base.html">Up</a> </font> </body> </html>