|
Mac Dev Center
Mac OS X Reference Library Core Services Layer Publication Subscription Publication Subscription Framework Reference
|
PSEnclosure |
| Framework: | /System/Library/Frameworks/PubSub.framework |
| Inherits from: | |
| Declared In: | |
| See Also: |
A PSEnclosure object contains a link to an external resource such as a sound or image file
associated with an entry. An enclosure is similar to an attachment
in an email, but rather than include the file itself in the entry, only a link is provided. Each enclosure
object is linked to a entry object.
An enclosure object provides properties for retrieving information about the enclosure, such as its URL, length,
and MIME type, as well as methods to download the file linked to in the enclosure. Invoke the download: method to
begin downloading the enclosure's file. To check on the status of the download, register for the
PSEnclosureDownloadStateDidChangeNotification notification. It is not recommended that you subclass PSEnclosure.
The path to the downloaded enclosure. (read-only)
The entry with which the enclosure is linked. (read-only)
The length of the file in the enclosure. (read-only)
The MIME type of the enclosure. (read-only)
A URL to the enclosure's location. (read-only)
downloadedPath |
The path to the downloaded enclosure. (read-only)
@property (
readonly) NSString * downloadedPath;
The method returns nil unless the download has completed.
entry |
The entry with which the enclosure is linked. (read-only)
@property (
readonly) PSEntry* entry;
The entry associated with the enclosure.
The inverse of the enclosures property of the PSEntry class.
An enclosure follows a one-to-one relationship and can only be linked to a single entry.
This method attempts to communicate with the PubSubAgent process and causes the agent
to launch if it is not already running. If PubSubAgent cannot be contacted, an exception
will be thrown with the name PSException. To avoid problems, you should
always be prepared to catch an exception thrown by this method.
length |
The length of the file in the enclosure. (read-only)
@property (
readonly) long long length;
The length, in bytes, of the file in the enclosure.
The return value is initially parsed from the length attribute of a element
in Atom and the length attribute of The MIME type of the enclosure. (read-only)
The MIME type corresponds to the A URL to the enclosure's location. (read-only)
The return value corresponds to the
0.
The value may change after downloading begins and the true length is
received from the server.
MIMEType
@property (
readonly,
retain) NSString * MIMEType;
Discussion
'type' attribute of the element in Atom and to the 'type' attribute of the
URL
@property (
readonly,
retain) NSURL * URL;
Discussion
'href' attribute of the element in Atom and to the 'url' attribute of the