DropIOAsset Class Reference

The DropIOAsset class is the class that encapsulates the common properties of all Drop.io asset types. More...

#import <DropIOAsset.h>

Inherited by DropIOAudio, DropIODocument, DropIOImage, DropIOLink, DropIOMovie, and DropIONote.


Public Member Functions

(id) - init
 Initializes a new, empty asset object.
(void) - dealloc
 Deallocates memory used by the asset.
(void) - update
 Updates Drop.io with this asset's properties.
(void) - delete
 Permanently deletes this asset from its drop on Drop.io.
(void) - releaseThumbnail
(BOOL) - isEditable
(void) - sendWithParameters:
 Sends the asset to a destination specified by the given parameters.
(void) - sendToEmail:message:
 Sends the asset via email to the specified email addresses, with the given message text.
(void) - sendToDropNamed:
 Sends the asset to the drop with the given name.
(void) - sendToFax:
 Sends the asset to the given fax number.
(void) - setValue:forUndefinedKey:
 Sets the value for all keys not predefined for this object.

Static Public Member Functions

(DropIOAsset *) + assetWithProperties:
 Static factory method; returns a new DropIOAsset object with the properties specified in the given dictionary object.

Properties

NSMutableDictionary * properties
 All asset properties are stored in a dictionary.
NSStringname
NSStringtype
NSStringtitle
NSStringdescription
NSNumber * filesize
NSDate * createdAt
NSStringstatus
NSURL * hiddenUrl
UIImageicon
DropIODropdrop
 DropIODrop object that owns this asset


Detailed Description

The DropIOAsset class is the class that encapsulates the common properties of all Drop.io asset types.

It has a reference to its parent DropIODrop object and knows how to:

See also:
DropIONote

DropIOImage

DropIODocument

DropIOLink

DropIOMovie

DropIOAudio


Member Function Documentation

+ (DropIOAsset *) assetWithProperties: (NSMutableDictionary*)  propDict  

Static factory method; returns a new DropIOAsset object with the properties specified in the given dictionary object.

Parameters:
propDict NSDictionary containing name-value pairs specifying the asset's parameters. See the Drop.io API documentation for parameter details.
Returns:
A new autoreleased DropIOAsset object with the given properties.

Referenced by DropIODrop::assetOperation:atUrl:withParameters:, DropIODrop::docWithFilename:data:mimeType:, and DropIODrop::loadAssetPages:.

- (void) dealloc  

Deallocates memory used by the asset.

- (void) delete  

Permanently deletes this asset from its drop on Drop.io.

Unless retained elsewhere, this will deallocate the receiver.

Referenced by DropIODrop::removeAsset:.

- (id) init  

Initializes a new, empty asset object.

Returns:
A new asset object.

Reimplemented in DropIOImage.

- (BOOL) isEditable  

Reimplemented in DropIONote, and DropIOLink.

- (void) releaseThumbnail  

Reimplemented in DropIOImage, and DropIOMovie.

- (void) sendToDropNamed: (NSString*)  dropName  

Sends the asset to the drop with the given name.

The asset must already belong to an existing drop.

Parameters:
dropName NSString containing the name of the target drop. The target drop must be configured to allow guests to add assets.
See also:
- sendWithParameters:

- sendToEmail:message:

- sendToFax:

- (void) sendToEmail: (NSArray*)  emailAddressArray
message: (NSString*)  optionalMessageText 

Sends the asset via email to the specified email addresses, with the given message text.

The asset must already belong to a drop.

Parameters:
emailAddressArray NSArray of NSStrings containing email addresses to send the asset to.
optionalMessageText NSString containing the optional body text of the email message. Pass nil to send no message text.
See also:
- sendWithParameters:

- sendToDropNamed:

- sendToFax:

- (void) sendToFax: (NSString*)  faxNumber  

Sends the asset to the given fax number.

Note that currently, the Drop.io API only supports faxing of document and image assets. Also, the asset must already belong to a drop.

Parameters:
faxNumber NSString containing a fax telephone number.
See also:
- sendWithParameters:

- sendToEmail:message:

- sendToDropNamed:

- (void) sendWithParameters: (NSDictionary*)  params  

Sends the asset to a destination specified by the given parameters.

Parameters:
params NSDictionary containing the API parameters required to send the asset. See the Drop.io API documentation for parameter details.
See also:
- sendToEmail:message:

- sendToDropNamed:

- sendToFax:

Referenced by sendToDropNamed:, sendToEmail:message:, and sendToFax:.

- (void) setValue: (id)  value
forUndefinedKey: (NSString *)  key 

Sets the value for all keys not predefined for this object.

Used by Key-Value Coding (KVC) methods. In particular, this method is called by the XMLToObjectParser class to set values for asset properties not predefined by the DropIOAsset classes.

Parameters:
value Object id to set as the value for the given undefined key.
key NSString containing a key not previously defined for this object.

- (void) update  

Updates Drop.io with this asset's properties.


Property Documentation

- (NSDate *) createdAt [read, write, retain]

- (NSString *) description [read, write, retain]

Referenced by update.

- (DropIODrop *) drop [read, write, retain]

- (NSNumber *) filesize [read, write, retain]

- (NSURL *) hiddenUrl [read, write, retain]

- (UIImage *) icon [read, assign]

- (NSString *) name [read, write, retain]

- (NSMutableDictionary *) properties [read, write, retain]

All asset properties are stored in a dictionary.

Property keys and their meaning:

"name"
String containing name of asset used to identify it in URLs and API.

"type"
String containing type of asset; one of: note, link, document, image, movie, audio.

"title"
String containing human-readable descriptive title for asset.

"description"
String containing human-readable long-format description of asset.

"filesize"
Number containing size of the asset, in bytes.

"createdAt"
Date containing creation date/time.

"status"
String containing conversion status of asset; one of: "converted", "unconverted". For image, audio, and document types, the "converted" URL is not available until status is "converted".

"hiddenUrl"
String containing url to original asset without revealing drop's base URL or name.

"thumbnail"
Only for type: image, movie. String containing url of preview image up to 100x100px.

"file"
Only for type: image, audio, movie, document or status: unconverted. String containing url of original file; special access api key required.

"converted"
Only for type: image, audio, document. String containing url of converted file.

"pages"
Only for type: document. Number of pages in document.

"duration"
Only for type: movie, audio. Duration of content, in seconds.

"artist"
"trackTitle"
Only for type: audio. Strings containing ID3 tags of content.

"height"
"width"
Only for type: image. Pixel height and width of original content.

"contents"
Only for type: note. String containing HTML-encoded text of content.

"url"
Only for type: link. String containing link url.

Referenced by assetWithProperties:, dealloc, init, and setValue:forUndefinedKey:.

- (NSString *) status [read, write, retain]

- (NSString *) title [read, write, retain]

Referenced by update.

- (NSString *) type [read, write, retain]

Referenced by assetWithProperties:.


The documentation for this class was generated from the following files:

Generated on Thu May 21 13:52:19 2009 for DropKit by  doxygen 1.5.8