DropIODrop Class Reference

Class that encapsulates a Drop.io drop. More...

#import <DropIODrop.h>


Public Member Functions

(NSURL *) - emailURL
 Returns a "mailto:" URL for the drop's email address.
(NSURL *) - voicemailURL
 Returns a "tel:" URL for the drop's voicemail phone number.
(NSURL *) - conferenceURL
 Returns a "tel:" URL for the drop's conference phone number.
(NSURL *) - rssURL
 Returns the drop's RSS feed URL.
(NSURL *) - faxURL
 Returns the URL of the drop's fax cover page document.
(NSURL *) - hiddenUploadURL
 Returns the URL of the drop's hidden upload URL.
(NSURL *) - dropURL
 Returns the drop's web URL.
(NSURL *) - apiURL
 Returns the drop's API URL.
(NSURL *) - dropcastURL
 Returns the drop's RSS feed URL as a dropcast URL (using the "itpc:" protocol).
(NSURL *) - feedURLForFormat:
 Returns the drop's RSS feed URL in the given format.
(NSURL *) - mobileURL
 Returns the drop's mobile API URL.
(NSURL *) - chatURL
 Returns the drop's chat URL.
(NSURL *) - webAuthURL
 Returns the drop's URL for a web authentication redirect, which can be used to pre-authenticate a web view of the drop so that the user does not need to re-enter their security token.
(NSURL *) - URLForAssetsPage:
 Returns the URL for the drop's list of assets on the given page.
(NSURL *) - URLForAssetNamed:
 Returns the Drop.io API URL for the asset with the given name in this drop.
(NSIndexSet *) - indexSetForAllAssetPages
(NSUInteger) - lastAssetPageIndex
 Returns the index of the last asset page for this drop.
(void) - loadAssetPages:
 Loads all assets in the asset pages specified by the given page indexes.
(void) - loadAssetPagesInBackground:
 Loads all assets in the asset pages specified by the given page indexes, in a background thread.
(void) - loadAllAssets
 Loads all assets in the drop.
(void) - loadAllAssetsInBackground
 Loads all assets in the drop, in a background thread.
(void) - unloadAssetPages:
 Unloads all assets in the asset pages specified by the given page indexes.
(void) - unloadAllAssets
 Unloads all assets in the drop.
(void) - reloadAssetPages:
 Reloads all assets in the asset pages specified by the given page indexes.
(void) - reloadAssetPagesInBackground:
 Reloads all assets in the asset pages specified by the given page indexes, in a background thread.
(void) - reloadAllAssets
 Reloads all assets in the drop.
(void) - reloadAllAssetsInBackground
 Reloads all assets in the drop, in a background thread.
(BOOL) - areAssetPagesLoaded:
 Returns true if the DropIOAsset objects in the given asset pages have been loaded.
(BOOL) - areAllAssetsLoaded
 Returns true if all of the drop's DropIOAsset objects have been loaded.
(void) - sortAssetPages:
 Sorts the assets within the given asset pages according to the drop's sortOrder setting.
(void) - sortAllAssets
 Sorts all the drop's assets according to the drop's sortOrder setting.
(NSUInteger) - countAssetsInAssetPages:
 Returns an integer count of all assets within the given asset pages.
(NSUInteger) - countAllAssets
 Returns an integer count of the DropIOAssets in this drop.
(NSUInteger) - countAssetsOfType:inAssetPages:
 Returns an integer count of the DropIOAssets of the given type within the given asset pages.
(NSUInteger) - countAllAssetsOfType:
 Returns an integer count of the DropIOAssets of the given type in this drop.
(DropIOAsset *) - findAssetNamed:inAssetPages:loadIfMissing:
 Finds a DropIOAsset object with the given name within the given asset pages.
(DropIOAsset *) - findAssetNamed:loadAllIfMissing:
 Finds a DropIOAsset object in this drop with the given name.
(DropIOAsset *) - assetAtIndex:inAssetPages:
 Returns the DropIOAsset object at the given index within the given range of asset pages.
(void) - addAsset:
 Adds the given DropIOAsset object to this drop object's list of assets.
(void) - removeAsset:
 Removes the given DropIOAsset object from this drop's list of assets and permanently deletes the asset from the drop's website at drop.io.
(void) - removeAssetAtIndex:inAssetPages:
 Removes the DropIOAsset at the given index within the specified asset pages and permanently deletes the asset from Drop.io.
(DropIOAsset *) - assetOperation:atUrl:withParameters:
 Basic bottleneck method for drop.io RESTful asset operations.
(DropIOAsset *) - assetWithParameters:
 Creates a new Drop.io asset in the receiving drop from the given request parameters.
(DropIONote *) - noteWithTitle:contents:
 Creates a new note in this drop with the given title and contents.
(DropIOLink *) - linkWithTitle:url:description:
 Creates a new link in this drop with the given title and description, pointing to the given URL.
(DropIODocument *) - docWithFilename:data:mimeType:
 Creates a new document in this drop with the given filename, data, and MIME type.
(DropIOImage *) - imageWithName:data:format:
 Creates a new image in this drop with the given name and image data in the given image format.
(void) - recordVoicemail
 Passes the drop's voicemail URL to the application to open using any available "tel:" URL handler.
(void) - conferenceCall
 Passes the drop's conference call URL to the application to open using any available "tel:" URL handler.
(NSString *) - bestTokenIncludingPassword:
 Returns the best security token available for this drop, to be used in Drop.io API requests.
(BOOL) - canAdd
 Returns true if the drop's current settings allow assets to be added to it.
(BOOL) - canEdit
 Returns true if the drop's current settings allow assets to be edited/updated.
(BOOL) - canDelete
 Returns true if the drop's current settings allow assets to be deleted.
(BOOL) - canComment
 Returns true if the drop's current settings allow comments to be added to it.
(BOOL) - canLoadAllAssets
 Returns true if the drop has few enough assets to load all at once.
(void) - update
 Updates Drop.io with this drop object's properties.
(void) - delete
 Permanently deletes this drop and all of its assets from Drop.io.
(void) - loadAssets
 Loads all assets in the drop.
(void) - unloadAssets
 Unloads all assets in the drop.
(void) - reloadAssets
 Reloads all assets in the drop.
(BOOL) - areAssetsLoaded
 Returns true if all of the drop's DropIOAsset objects have been loaded.
(void) - sortAssets
 Sorts the drop's assets according to the drop's sortOrder setting.
(NSInteger) - countAssetsOfType:
 Returns an integer count of the DropIOAssets of the given type in this drop.
(DropIOAsset *) - findAssetNamed:loadIfMissing:
 Finds a DropIOAsset object in this drop with the given name.
(DropIOAsset *) - assetAtIndex:
 Returns the DropIOAsset object at the given index in the drop's list of assets.
(void) - removeAssetAtIndex:

Properties

NSStringname
 Name of the drop; used in drop URL.
NSStringpassword
 Password entered by user to access drop; only used for first access.
NSStringadminPassword
 Admin password; only used when creating a new drop.
NSStringguestPassword
 Guest password; only used when creating a new drop.
NSStringadminToken
 String token or password used to gain admin access.
NSStringguestToken
 String token or password used to gain guest access.
NSStringemail
 Email address to which you can send to add to drop.
NSStringvoicemail
 Telephone number to which you can record audio to add to drop.
NSStringconference
 Telephone number to use for phone conferencing.
NSStringrss
 RSS feed URL for drop contents.
NSStringfax
 Fax cover sheet URL for faxing documents to drop.
NSStringhiddenUploadUrl
 Url of a web page that uploads to this drop without revealing the drop's identity.
NSStringexpirationLength
 String token indicating drop expiration.
NSUInteger currentBytes
 Current total size of assets stored in this drop.
NSUInteger maxBytes
 Maximum total size of assets that can be stored in this drop.
NSUInteger assetCount
 Count of assets (files) stored in drop.
BOOL guestsCanAdd
 True if guests can add to drop.
BOOL guestsCanDelete
 True if guests can delete from drop.
BOOL guestsCanComment
 True if guests can add comments to drop.
NSStringpremiumCode
 Access code to enable premium drop features; only used when creating a new drop.
NSMutableArray * assetPages
 Array of arrays of DropIOAsset objects; one array per asset page.
NSStringtitle
 Human-readable title for drop; taken from Drops.plist.
AssetSortOrder sortOrder
 Sort order of assets array; default by type then title.
NSMutableArray * sortedAssets
 Sorted array of assets resulting from last call to sortAssetPages:.
NSIndexSet * sortedPageIndexes
 Page indexes of asset pages sorted by last call to sortAssetPages:.
BOOL loadingAssets
 Flag indicating that loadAssets thread is running in background.


Detailed Description

Class that encapsulates a Drop.io drop.

Drops have properties and a list of assets.


Member Function Documentation

- (void) addAsset: (DropIOAsset*)  asset  

Adds the given DropIOAsset object to this drop object's list of assets.

This method only manipulates objects in memory; it does NOT add the asset to the drop on the drop.io website. To create an asset on the drop website, use one of the asset creation methods listed below.

Parameters:
asset A DropIOAsset object to be added to this drop in memory.
See also:
- noteWithTitle:contents:

- linkWithTitle:url:description:

- docWithFilename:data:mimeType:

- imageWithName:data:format:

Referenced by assetWithParameters:, and docWithFilename:data:mimeType:.

- (NSURL *) apiURL  

Returns the drop's API URL.

Returns:
An autoreleased NSURL object pointing to the drop's API URL.

- (BOOL) areAllAssetsLoaded  

Returns true if all of the drop's DropIOAsset objects have been loaded.

Returns:
Boolean true if all assetPages arrays have been loaded.

Referenced by areAssetsLoaded.

- (BOOL) areAssetPagesLoaded: (NSIndexSet*)  pageIndexes  

Returns true if the DropIOAsset objects in the given asset pages have been loaded.

Returns:
Boolean true if all assetPages arrays have been loaded.

Referenced by areAllAssetsLoaded.

- (BOOL) areAssetsLoaded  

Returns true if all of the drop's DropIOAsset objects have been loaded.

Returns:
Boolean true if all assets have been loaded.
Deprecated:
See also:
- areAllAssetsLoaded

- (DropIOAsset *) assetAtIndex: (NSInteger)  index  

Returns the DropIOAsset object at the given index in the drop's list of assets.

Parameters:
index Integer index of the desired asset in this drop.
Returns:
The autoreleased DropIOAsset object at the given index.
Deprecated:
See also:
- assetAtIndex:inAssetPages:

- (DropIOAsset *) assetAtIndex: (NSUInteger)  index
inAssetPages: (NSIndexSet*)  pageIndexes 

Returns the DropIOAsset object at the given index within the given range of asset pages.

Parameters:
index Integer index of the desired asset within the given asset page range.
pageIndexes NSIndexSet object defining the range of asset pages within which to find the asset.
Returns:
The autoreleased DropIOAsset object at the given index.

Referenced by assetAtIndex:.

- (DropIOAsset *) assetOperation: (NSString*)  opString
atUrl: (NSString*)  urlStr
withParameters: (NSDictionary*)  params 

Basic bottleneck method for drop.io RESTful asset operations.

Parameters:
opString NSString containing the HTTP method to use in the Drop.io HTTP request.
urlStr NSString containing the Drop.io API URL for the asset operation.
params NSDictionary containing a set of name-value pairs to use in the body of the HTTP request.
Returns:
An autoreleased DropIOAsset object returned from the request, if present.

Referenced by assetWithParameters:, DropIOAsset::delete, DropIOAsset::sendWithParameters:, and DropIOAsset::update.

- (DropIOAsset *) assetWithParameters: (NSDictionary*)  params  

Creates a new Drop.io asset in the receiving drop from the given request parameters.

Parameters:
params NSDictionary containing name-value pairs specifying the properties of the new asset. See the Drop.io API documentation for parameter datails.
Returns:
A new autoreleased DropIOAsset instance returned from the API.

Referenced by linkWithTitle:url:description:, and noteWithTitle:contents:.

- (NSString *) bestTokenIncludingPassword: (BOOL)  includePassword  

Returns the best security token available for this drop, to be used in Drop.io API requests.

Returns the admin token if available, otherwise it returns the guest token. If neither are available, and a user-supplied password is available, and the includePassword parameter is true, then the user-supplied password is returned as a last resort. If none of the above are available, an empty string is returned.

Parameters:
includePassword Boolean flag indicating whether or not to return a user-supplied password as the token.
Returns:
NSString containing the best available security token.

Referenced by apiURL, delete, DropIOAsset::delete, docWithFilename:data:mimeType:, linkWithTitle:url:description:, noteWithTitle:contents:, DropIOAsset::sendToDropNamed:, DropIOAsset::sendToEmail:message:, DropIOAsset::sendToFax:, update, DropIOAsset::update, URLForAssetNamed:, and URLForAssetsPage:.

- (BOOL) canAdd  

Returns true if the drop's current settings allow assets to be added to it.

Assets can be added if the drop has an admin token, or if the drop has a guest token and the drop is configured to allow guests to add assets.

Returns:
Boolean true if assets can be added to the drop.

Referenced by canEdit.

- (BOOL) canComment  

Returns true if the drop's current settings allow comments to be added to it.

Comments can be added if the drop has an admin token, or if the drop has a guest token and the drop is configured to allow guests to add comments.

Returns:
Boolean true if comments can be added to the drop.

- (BOOL) canDelete  

Returns true if the drop's current settings allow assets to be deleted.

Assets can be deleted if the drop has an admin token, or if the drop has a guest token and the drop is configured to allow guests to delete assets.

Returns:
Boolean true if assets can be deleted from the drop.

- (BOOL) canEdit  

Returns true if the drop's current settings allow assets to be edited/updated.

Assets can be updated if the drop has an admin token, or if the drop has a guest token and the drop is configured to allow guests to add assets.

Returns:
Boolean true if the drop's assets can be updated.

Referenced by DropIOLink::isEditable.

- (BOOL) canLoadAllAssets  

Returns true if the drop has few enough assets to load all at once.

Currently, we only allow sorting of assets if the assetCount is lower than a predefined threshold, because all the assets must be held in memory in order to sort them. Hopefully, a future version of the drop.io API will allow sorting assets through the API.

Returns:
Boolean true if all assets can be loaded into memory at once.

Referenced by loadAllAssets.

- (NSURL *) chatURL  

Returns the drop's chat URL.

Returns:
An autoreleased NSURL object pointing to the drop's web chat URL.

- (void) conferenceCall  

Passes the drop's conference call URL to the application to open using any available "tel:" URL handler.

On the iPhone, this method will dial the drop's conference call phone number. On an iPod touch, this method does nothing.

- (NSURL *) conferenceURL  

Returns a "tel:" URL for the drop's conference phone number.

Within the iPhone SDK, passing this URL to the UIApplication openURL: method will launch the Phone app and dial the drop's conference number.

Returns:
An autoreleased NSURL object containing the drop's conference phone number.

Referenced by conferenceCall.

- (NSUInteger) countAllAssets  

Returns an integer count of the DropIOAssets in this drop.

Returns:
Integer count of the number of assets in this drop.

- (NSUInteger) countAllAssetsOfType: (NSString*)  assetType  

Returns an integer count of the DropIOAssets of the given type in this drop.

Parameters:
assetType NSString containing the type of asset to be counted. Must be one of the kDropIOAssetType_* constants defined in DropIOAsset.h.
Returns:
Integer count of the number of assets of the given type in this drop.

Referenced by countAssetsOfType:.

- (NSUInteger) countAssetsInAssetPages: (NSIndexSet*)  pageIndexes  

Returns an integer count of all assets within the given asset pages.

Parameters:
pageIndexes NSIndexSet specifying the range of asset pages over which to count assets.
Returns:
Unsigned integer count of all assets within the given asset pages.

- (NSInteger) countAssetsOfType: (NSString*)  assetType  

Returns an integer count of the DropIOAssets of the given type in this drop.

Parameters:
assetType NSString containing the type of asset to be counted. Must be one of the kDropIOAssetType_* constants defined in DropIOAsset.h.
Returns:
Integer count of the number of assets of the given type in this drop.
Deprecated:
See also:
- countAllAssetsOfType:

- (NSUInteger) countAssetsOfType: (NSString*)  assetType
inAssetPages: (NSIndexSet*)  pageIndexes 

Returns an integer count of the DropIOAssets of the given type within the given asset pages.

Parameters:
assetType NSString containing the type of asset to be counted. Must be one of the kDropIOAssetType_* constants defined in DropIOAsset.h.
pageIndexes NSIndexSet specifying the range of asset pages over which to count assets.
Returns:
Integer count of the number of assets of the given type within the asset page range.

Referenced by countAllAssetsOfType:.

- (void) delete  

Permanently deletes this drop and all of its assets from Drop.io.

- (DropIODocument *) docWithFilename: (NSString*)  fileName
data: (NSData*)  docData
mimeType: (NSString*)  docMimeType 

Creates a new document in this drop with the given filename, data, and MIME type.

Performs an HTTP file upload of the document to Drop.io.

Parameters:
fileName NSString containing the filename of the document.
docData NSData object containing the document data.
docMimeType NSString containing the format of the data, for example, "image/png", "application/msword", or "text/xml".
Returns:
An autoreleased DropIODocument object with the given properties which has been added to the drop.

Referenced by imageWithName:data:format:.

- (NSURL *) dropcastURL  

Returns the drop's RSS feed URL as a dropcast URL (using the "itpc:" protocol).

Returns:
An autoreleased NSURL object pointing to the drop's dropcast URL.

Referenced by feedURLForFormat:.

- (NSURL *) dropURL  

Returns the drop's web URL.

Returns:
An autoreleased NSURL object pointing to the drop's web URL.

- (NSURL *) emailURL  

Returns a "mailto:" URL for the drop's email address.

Returns:
An autoreleased NSURL object containing the drop's email address.

- (NSURL *) faxURL  

Returns the URL of the drop's fax cover page document.

Returns:
An autoreleased NSURL object pointing to the drop's fax cover page.

- (NSURL *) feedURLForFormat: (DropFeedFormat format  

Returns the drop's RSS feed URL in the given format.

Parameters:
format DropFeedFormat specifier; either kDropFeedFormat_RSS or kDropFeedFormat_Dropcast.
Returns:
An autoreleased NSURL pointing to the drop's RSS feed URL.

- (DropIOAsset *) findAssetNamed: (NSString*)  assetName
inAssetPages: (NSIndexSet*)  pageIndexes
loadIfMissing: (BOOL)  loadFlag 

Finds a DropIOAsset object with the given name within the given asset pages.

If not found in the assetPages array, the object is loaded from Drop.io if loadFlag is set.

Parameters:
assetName NSString containing the name of the asset to find within the given asset pages.
pageIndexes NSIndexSet object defining the range of asset pages within which to find the asset.
loadFlag Boolean flag indicating that the DropIOAsset object should be loaded from Drop.io if it is not already loaded.
Returns:
An autoreleased DropIOAsset object with the given name.

Referenced by findAssetNamed:inAssetPages:loadIfMissing:, and findAssetNamed:loadAllIfMissing:.

- (DropIOAsset *) findAssetNamed: (NSString*)  assetName
loadAllIfMissing: (BOOL)  loadFlag 

Finds a DropIOAsset object in this drop with the given name.

If not found in the assetPages array, the object is loaded from Drop.io if loadFlag is set.

Parameters:
assetName NSString containing the name of the asset to find in this drop.
loadFlag Boolean flag indicating that the DropIOAsset object should be loaded from Drop.io if it is not already loaded.
Returns:
An autoreleased DropIOAsset object with the given name.

Referenced by findAssetNamed:loadIfMissing:.

- (DropIOAsset *) findAssetNamed: (NSString*)  assetName
loadIfMissing: (BOOL)  loadFlag 

Finds a DropIOAsset object in this drop with the given name.

If not found in the assetPages array, the object is loaded from Drop.io if loadFlag is set.

Parameters:
assetName NSString containing the name of the asset to find in this drop.
loadFlag Boolean flag indicating that the DropIOAsset object should be loaded from Drop.io if it is not already loaded.
Returns:
An autoreleased DropIOAsset object with the given name.
Deprecated:
See also:
- findAssetNamed:loadAllIfMissing:

- (NSURL *) hiddenUploadURL  

Returns the URL of the drop's hidden upload URL.

The hidden upload URL is a URL that does not reveal the drop's name.

Returns:
An autoreleased NSURL object pointing to the drop's hidden upload URL.

- (DropIOImage *) imageWithName: (NSString*)  imgName
data: (NSData*)  imgData
format: (NSString*)  imgDataFormat 

Creates a new image in this drop with the given name and image data in the given image format.

Performs an HTTP file upload of the image data to Drop.io.

Parameters:
imgName NSString containing the name of the image.
imgData NSData object containing the image data.
imgDataFormat NSString containing the format of the image data, for example, "png", "jpeg", or "gif".
Returns:
An autoreleased DropIOImage object with the given properties which has been added to the drop.

- (NSIndexSet *) indexSetForAllAssetPages  

- (NSUInteger) lastAssetPageIndex  

Returns the index of the last asset page for this drop.

The index is calculated from the assetCount property of the drop object.

Returns:
An unsigned integer representing the zero-based index of the last asset page for the drop.

Referenced by addAsset:, countAssetsInAssetPages:, indexSetForAllAssetPages, and loadAssetPages:.

- (DropIOLink *) linkWithTitle: (NSString*)  linkTitle
url: (NSURL*)  linkURL
description: (NSString*)  linkDesc 

Creates a new link in this drop with the given title and description, pointing to the given URL.

Parameters:
linkTitle NSString containing the title for the link to use for display.
linkURL NSURL object pointing to the URL to be linked to.
linkDesc NSString containing the optional textual description for the link. May be nil.
Returns:
An autoreleased DropIOLink object with the given properties which has been added to the drop.

- (void) loadAllAssets  

Loads all assets in the drop.

If the drop has too many assets to load all at once (as determined by the canLoadAllAssets method), the assets are not loaded and an error message is logged.

See also:
- loadAssetPages:

- loadAssetPagesInBackground:

- loadAllAssetsInBackground

Referenced by loadAssets, and reloadAllAssets.

- (void) loadAllAssetsInBackground  

Loads all assets in the drop, in a background thread.

If the drop has too many assets to load all at once (as determined by the canLoadAllAssets method), the assets are not loaded and an error message is logged.

See also:
- loadAssetPages:

- loadAssetPagesInBackground:

- loadAllAssets

- (void) loadAssetPages: (NSIndexSet*)  pageIndexes  

Loads all assets in the asset pages specified by the given page indexes.

Parameters:
pageIndexes An NSIndexSet object specifying the range of asset page indexes to be loaded.
See also:
- loadAllAssets

- loadAssetPagesInBackground:

Referenced by addAsset:, assetAtIndex:inAssetPages:, countAssetsOfType:inAssetPages:, findAssetNamed:inAssetPages:loadIfMissing:, loadAllAssets, and reloadAssetPages:.

- (void) loadAssetPagesInBackground: (NSIndexSet*)  pageIndexes  

Loads all assets in the asset pages specified by the given page indexes, in a background thread.

Parameters:
pageIndexes An NSIndexSet object specifying the range of asset page indexes to be loaded.
See also:
- loadAllAssets

- loadAssetPages:

- (void) loadAssets  

Loads all assets in the drop.

Deprecated:
See also:
- loadAllAssets

- (NSURL *) mobileURL  

Returns the drop's mobile API URL.

Returns:
An autoreleased NSURL object pointing to the drop's mobile web URL.

- (DropIONote *) noteWithTitle: (NSString*)  noteTitle
contents: (NSString*)  text 

Creates a new note in this drop with the given title and contents.

Parameters:
noteTitle NSString containing the title to use for the note.
text NSString containing the text contents of the note.
Returns:
An autoreleased DropIONote object with the given title and contents which has been added to the drop.

- (void) recordVoicemail  

Passes the drop's voicemail URL to the application to open using any available "tel:" URL handler.

On the iPhone, this method will dial the drop's voicemail phone number. On an iPod touch, this method does nothing.

- (void) reloadAllAssets  

Reloads all assets in the drop.

See also:
- reloadAllAssetsInBackground

- reloadAssetPages:

- reloadAssetPagesInBackground:

Referenced by reloadAssets.

- (void) reloadAllAssetsInBackground  

Reloads all assets in the drop, in a background thread.

See also:
- reloadAllAssets

- reloadAssetPages:

- reloadAssetPagesInBackground:

- (void) reloadAssetPages: (NSIndexSet*)  pageIndexes  

Reloads all assets in the asset pages specified by the given page indexes.

Parameters:
pageIndexes An NSIndexSet object specifying the range of asset page indexes to be loaded.
See also:
- reloadAllAssets

- reloadAssetPagesInBackground:

- (void) reloadAssetPagesInBackground: (NSIndexSet*)  pageIndexes  

Reloads all assets in the asset pages specified by the given page indexes, in a background thread.

Parameters:
pageIndexes An NSIndexSet object specifying the range of asset page indexes to be loaded.
See also:
- reloadAllAssets

- reloadAssetPages:

- (void) reloadAssets  

Reloads all assets in the drop.

Deprecated:
See also:
- reloadAllAssets

- (void) removeAsset: (DropIOAsset*)  asset  

Removes the given DropIOAsset object from this drop's list of assets and permanently deletes the asset from the drop's website at drop.io.

Parameters:
asset A DropIOAsset object to be deleted from this drop.

Referenced by removeAssetAtIndex:inAssetPages:.

- (void) removeAssetAtIndex: (NSInteger)  index  

- (void) removeAssetAtIndex: (NSUInteger)  index
inAssetPages: (NSIndexSet*)  pageIndexes 

Removes the DropIOAsset at the given index within the specified asset pages and permanently deletes the asset from Drop.io.

Parameters:
index Integer index of the DropIOAsset object to be deleted from this drop.
pageIndexes NSIndexSet specifying the range of asset pages over which to count assets.

Referenced by removeAssetAtIndex:.

- (NSURL *) rssURL  

Returns the drop's RSS feed URL.

Returns:
An autoreleased NSURL object pointing to the drop's RSS feed.

Referenced by feedURLForFormat:.

- (void) sortAllAssets  

Sorts all the drop's assets according to the drop's sortOrder setting.

Referenced by sortAssets.

- (void) sortAssetPages: (NSIndexSet*)  pageIndexes  

Sorts the assets within the given asset pages according to the drop's sortOrder setting.

Parameters:
pageIndexes NSIndexSet specifying the range of asset pages over which to sort assets.

Referenced by assetAtIndex:inAssetPages:, and sortAllAssets.

- (void) sortAssets  

Sorts the drop's assets according to the drop's sortOrder setting.

Deprecated:
See also:
- sortAllAssets

- (void) unloadAllAssets  

Unloads all assets in the drop.

See also:
- unloadAssetPages:

Referenced by reloadAllAssets, and unloadAssets.

- (void) unloadAssetPages: (NSIndexSet*)  pageIndexes  

Unloads all assets in the asset pages specified by the given page indexes.

Parameters:
pageIndexes An NSIndexSet object specifying the range of asset page indexes to be unloaded from memory.
See also:
- unloadAllAssets

Referenced by reloadAssetPages:.

- (void) unloadAssets  

Unloads all assets in the drop.

Deprecated:
See also:
- unloadAllAssets

- (void) update  

Updates Drop.io with this drop object's properties.

- (NSURL *) URLForAssetNamed: (NSString*)  assetName  

Returns the Drop.io API URL for the asset with the given name in this drop.

Parameters:
assetName NSString containing the name of the asset whose URL is to be returned.
Returns:
An autoreleased NSURL object pointing to the named asset in this drop.

Referenced by addAsset:, and loadAssetPages:.

- (NSURL *) URLForAssetsPage: (NSUInteger)  assetsPage  

Returns the URL for the drop's list of assets on the given page.

The Drop.io API returns the list of assets in a drop in pages of 30 assets per page.

Parameters:
assetsPage Integer one-based page number to return a list of assets for.
Returns:
An autoreleased NSURL object pointing to the given page of assets in the drop.

Referenced by loadAssetPages:.

- (NSURL *) voicemailURL  

Returns a "tel:" URL for the drop's voicemail phone number.

Within the iPhone SDK, passing this URL to the UIApplication openURL: method will launch the Phone app and dial the drop's voicemail number.

Returns:
An autoreleased NSURL object containing the drop's voicemail phone number.

Referenced by recordVoicemail.

- (NSURL *) webAuthURL  

Returns the drop's URL for a web authentication redirect, which can be used to pre-authenticate a web view of the drop so that the user does not need to re-enter their security token.

See for more information.

Returns:
An autoreleased NSURL object pointing to the drop's web authentication URL.


Property Documentation

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

Admin password; only used when creating a new drop.

Referenced by update.

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

String token or password used to gain admin access.

Referenced by bestTokenIncludingPassword:, canAdd, canComment, and canDelete.

- (NSUInteger) assetCount [read, write, assign]

Count of assets (files) stored in drop.

Referenced by addAsset:, canLoadAllAssets, countAssetsInAssetPages:, DropIOAsset::delete, lastAssetPageIndex, and loadAllAssets.

- (NSMutableArray *) assetPages [read, write, retain]

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

Telephone number to use for phone conferencing.

Referenced by conferenceURL.

- (NSUInteger) currentBytes [read, write, assign]

Current total size of assets stored in this drop.

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

Email address to which you can send to add to drop.

Referenced by emailURL.

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

String token indicating drop expiration.

Referenced by update.

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

Fax cover sheet URL for faxing documents to drop.

Referenced by faxURL.

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

Guest password; only used when creating a new drop.

Referenced by update.

- (BOOL) guestsCanAdd [read, write, assign]

True if guests can add to drop.

Referenced by canAdd.

- (BOOL) guestsCanComment [read, write, assign]

True if guests can add comments to drop.

Referenced by canComment.

- (BOOL) guestsCanDelete [read, write, assign]

True if guests can delete from drop.

Referenced by canDelete.

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

String token or password used to gain guest access.

Referenced by bestTokenIncludingPassword:, canAdd, canComment, and canDelete.

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

Url of a web page that uploads to this drop without revealing the drop's identity.

Referenced by hiddenUploadURL.

- (BOOL) loadingAssets [read, write, assign]

Flag indicating that loadAssets thread is running in background.

- (NSUInteger) maxBytes [read, write, assign]

Maximum total size of assets that can be stored in this drop.

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

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

Password entered by user to access drop; only used for first access.

Referenced by bestTokenIncludingPassword:.

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

Access code to enable premium drop features; only used when creating a new drop.

Referenced by update.

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

RSS feed URL for drop contents.

Referenced by dropcastURL, and rssURL.

- (NSMutableArray *) sortedAssets [read, write, retain]

Sorted array of assets resulting from last call to sortAssetPages:.

Referenced by assetAtIndex:inAssetPages:, and DropIOAsset::delete.

- (NSIndexSet *) sortedPageIndexes [read, write, retain]

Page indexes of asset pages sorted by last call to sortAssetPages:.

Referenced by assetAtIndex:inAssetPages:.

- (AssetSortOrder) sortOrder [read, write, assign]

Sort order of assets array; default by type then title.

Referenced by assetAtIndex:inAssetPages:, and sortAssetPages:.

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

Human-readable title for drop; taken from Drops.plist.

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

Telephone number to which you can record audio to add to drop.

Referenced by voicemailURL.


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