Static Public Member Functions

OFCloudStorage Class Reference

#import <OFCloudStorage.h>

List of all members.

Static Public Member Functions

(void) + setDelegate:
(OFRequestHandle *) + upload:withKey:
(OFRequestHandle *) + downloadKeysForCurrentUser
(OFRequestHandle *) + downloadDataWithKey:

Detailed Description

The public interface for OFCloudStorage allows you to upload and download data from the Open Feint server. Data is associated uniquely in 3 fields

. This allows you to have static keys for your data in your application across all users (ex. static NSString* saveGameDataKey = "SaveGameData")


Member Function Documentation

+ (OFRequestHandle*) downloadDataWithKey: (NSString *)  key

Downloads the data associated with the key stored on the server and returns it to the OFCloudStorageDelegate that is set.

Returns:
OFRequestHandle for the server request. Use this to cancel the request.
Note:
Invokes - (void)didDownloadData on success and
  • (void)didFailDownloadData on failure.
+ (OFRequestHandle*) downloadKeysForCurrentUser

Gets all cloud storage keys on the Open Feint server for this user.

Returns:
OFRequestHandle for the server request. Use this to cancel the request.
Note:
Invokes - (void)didDownloadKeysForCurrentUser:(NSArray*)keys on success and
  • (void)didFailDownloadForCurrentUser on failure
+ (void) setDelegate: (id< OFCloudStorageDelegate >)  delegate

Set a delegate for all OFCloudStorage related actions. Must adopt the OFCloudStorageDelegate protocol.

Note:
Defaults to nil. Weak reference.
+ (OFRequestHandle*) upload: (NSData *)  data
withKey: (NSString *)  key 

Uploads the data to the OpenFeint Server and associates it with the key.

Parameters:
dataThe data to upload to the server
keyThe key to associate with the data
Returns:
OFRequestHandle for the server request. Use this to cancel the request
Note:
Invokes - (void)didUpload on success and
  • (void)didFailUpload on failure.

The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Enumerations Enumerator Properties