From 8b6e48953b64228644a6d921ff4b93e8eaaf23b0 Mon Sep 17 00:00:00 2001 From: Richard Frith-MacDonald Date: Mon, 25 Sep 2000 06:06:28 +0000 Subject: [PATCH] Added NSURLHandle documentation git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@7594 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 7 + Documentation/gsdoc/NSURLHandle.gsdoc | 82 +++++++-- Documentation/gsdoc/NSURLHandle.html | 232 +++++++++++++++++++++----- Source/NSURLHandle.m | 6 + 4 files changed, 273 insertions(+), 54 deletions(-) diff --git a/ChangeLog b/ChangeLog index 31dfa7473..66f5d122a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2000-09-25 Richard Frith-Macdonald + + * Source/NSURLHandle.m: ([-addClient:]) ensure that clients are only + recorded once. + * Documentation/gsdoc/NSURLHandle.gsdoc: fless out descriptions and + add type and protocol information. + 2000-09-24 Adam Fedor * configure.in: Check for rint in math library... diff --git a/Documentation/gsdoc/NSURLHandle.gsdoc b/Documentation/gsdoc/NSURLHandle.gsdoc index 22f60ab2c..139fd863f 100644 --- a/Documentation/gsdoc/NSURLHandle.gsdoc +++ b/Documentation/gsdoc/NSURLHandle.gsdoc @@ -35,7 +35,7 @@ anURL Returns the most recently registered NSURLHandle subclass that - responds to canInitWithURL: + responds to canInitWithURL: with YES. If there is no such subclass, returns nil. @@ -49,11 +49,12 @@ - + canInitWithURL: anURL - MUST be implemented by subclasses to say which URLs they can handle. + Implemented by subclasses to say which URLs they can handle. This method is used to determine which subclasses can be used to handle a particular URL. @@ -71,12 +72,18 @@ addClient: client + Adds an object conforming to the + NSURLHandleClient protocol + as a client of the URL handle. availableResourceData + Returns the resource data that is currently available for the + handle. This may be a partially loaded resource or may be + empty of no data has been loaded yet. @@ -84,18 +91,30 @@ backgroundLoadDidFailWithReason: reason + This method should be called when a background load fails. + The method passes the failure notification to the clients of + the handle - so subclasses should call super's implementation + at the end of their implementation of this method. beginLoadInBackground + This method is called by when a background load begins. + Subclasses should call super's implementation at + the end of their implementation of this method. - + cancelLoadInBackground + This method should be called to cancel a load currently in + progress. The method calls + endLoadInBackground + Subclasses should call super's implementation at + the end of their implementation of this method. @@ -105,50 +124,81 @@ loadComplete: yorn + This method must be called by subclasses whenever data is + loaded. - + endLoadInBackground + This method is called to stop any background loading process. + cancelLoadInBackground + uses this method to cancel loading. + Subclasses should call super's implementation at + the end of their implementation of this method. failureReason + Returns the failure reason for the last failure to load + the resource data. flushCachedData + Flushes any cached resource data. - + + initWithURL: + url + cached: + yesno + + Initialises a handle with the specified URL. + The flag determines whether the handle will cache resource data + and respond to requests from equivalent URLs for the cached data. + + + + loadInBackground + Starts (or queues) loading of the handle's resource data + in the background (asynchronously). - + loadInForeground + Loads the handle's resource data in the foreground (synchronously). + This may be implemented by starting a background load and + waiting for it to complete. - + propertyForKey: propertyKey + Returns the property for the specified key, or nil if the + key does not exist. - + propertyForKeyIfAvailable: propertyKey + Returns the property for the specified key, but only if the + handle does not need to do any work to retrieve it. @@ -156,34 +206,44 @@ removeClient: client + Removes an object from them list of clients notified of + resource loading events by the URL handle. resourceData + Returns the resource data belonging to the handler. + Calls loadInForeground if + necessary. status + Returns the current status of the handle. - + writeData: data + Writes resource data to the handle. Returns YES on success, + NO on failure. - + writeProperty: propertyValue + Attempts to set property for handle. + diff --git a/Documentation/gsdoc/NSURLHandle.html b/Documentation/gsdoc/NSURLHandle.html index 0634c1d44..bdf95ee03 100644 --- a/Documentation/gsdoc/NSURLHandle.html +++ b/Documentation/gsdoc/NSURLHandle.html @@ -19,6 +19,22 @@

Inherits from: NSObject


+

+ + An NSURLHandle instance is used to manage the resource data + corresponding to an NSURL object. A single NSURLHandle can + be used to manage multiple NSURL objects as long as those + objects all refer to the same resource. +

+ +

+ + Different NSURLHandle subclasses are used to manage different + types of URL (usually based on the scheme of the URL), and you + can register new subclasses to extend (or replace) the + standard ones. +

+

Instance Variables