CBEObject

Superclass:
Declared In:

Introduction

holder of a set of data, can represent a table row.



Methods

-getAcl:
-getMimeType
-getObjectType
-getStreams:
-keyValues
-length
-move:delegate:
-publish:privacy:description:password:delegate:
-remove:
-rename:delegate:
-setAcl:delegate:
-share:description:delegate:
-streams

Returns the currently loaded stream / streams attached to the object. If you upload a new stream with @c uploadStream(), you must call getStreams() again to get the new/updated streams. \note If @c getStreams() has not been called, then @c streams() returns an empty Streams object.

-unpublish:
-unShare:delegate:
-unsubscribe:
-updateKeyValues:keyValues:

getAcl:


-(void) getAcl:(id<GetAclObjectDelegatePtr>) delegate; 
Parameters
delegate

Pointer to a delegate::AclDelegate instance that is implemented by the user.

Discussion

get the Access Control List for the Object.


getMimeType


- (NSString*) getMimeType; 
Discussion

Returns the mime type of the object. \n E.g. application/pdf, audio/wav, image/jpg, text/xml, video/mp4 etc.


getObjectType


- (CBEObjectType) getObjectType; 
Discussion

Returns the Object type currently: Other | GroupInvite | ShareInvite


getStreams:


-(void) getStreams: (id<GetStreamsDelegatePtr>) delegate; 
Parameters
delegate

Pointer to a delegate::GetStreamsDelegate instance that is implemented by the user.

Discussion

*


keyValues


- (NSDictionary*) keyValues; 
Discussion

Returns all the key/values in a map.


length


- (uint64_t) length; 
Discussion

Returns the binary length/size of the object in Bytes.


move:delegate:


-(void) move:(CBEObjectId) destinationContainerId delegate:(id<MoveObjectDelegatePtr>) delegate; 
Parameters
destinationContainerId

the id number of the container moving to.

delegate

Pointer to a delegate::object::MoveDelegate instance that is implemented by the user.

Discussion

to relocate an object to a different container.


publish:privacy:description:password:delegate:


-(void) publish: (CBEPublishAccess) security privacy: (CBEPublishVisibility) privacy 
        description: (NSString*) description password: (NSString*) password 
        delegate: (id<PublishDelegatePtr>) delegate; 
Parameters
security

A cbe::Access enum

privacy

A cbe::WebShareVisibility enum

description

Description

password

Password

publishDelegate

Gets notified when the object has been published (or if there was an error)

Discussion

Publishes an object to a user.


remove:


-(void) remove:(id<RemoveObjectDelegatePtr>) delegate; 
Parameters
delegate

Pointer to a delegate::object::RemoveDelegate instance that is implemented by the user.

Discussion

Remove the object from cloud and locally


rename:delegate:


-(void) rename: (NSString*) name delegate: (id<RenameObjectDelegatePtr>) delegate; 
Parameters
name

string name of the object.

delegate

Pointer to a delegate::object::RenameDelegate instance that is implemented by the user.

Discussion

Rename object:


setAcl:delegate:


- (void) setAcl: (NSDictionary*) aclMap delegate: (id<SetAclObjectDelegatePtr>) delegate; 
Parameters
aclMap

The desired cbe::Permission "permission" for current object.

delegate

Pointer to a delegate::AclDelegate instance that is implemented by the user.

Discussion

Set the Access control list for the object.


share:description:delegate:


-(void) share: (CBEUserId) toUserGroup description: (NSString*) description 
        delegate: (id<ShareDelegatePtr>) delegate; 
Parameters
toUserGroup

takes a user id or group id (lastly named is for the future) and share to.

description

names the specific share between you and the user/group.

delegate

Pointer to a delegate::ShareDelegatePtr instance that is implemented by the user.

Discussion

Share Object to a user. Notifies the user that a share has occured so that the user can check what permissions the have been given. Sharing gives read permissions as of right now but might change in the future.


streams


Returns the currently loaded stream / streams attached to the object. If you upload a new stream with @c uploadStream(), you must call getStreams() again to get the new/updated streams. \note If @c getStreams() has not been called, then @c streams() returns an empty Streams object.

- (NSArray*) streams; 

unpublish:


-(void) unpublish:(id<UnpublishDelegatePtr>) delegate; 
Parameters
publishDelegate

Gets notified when the object has been unpublished (or if there was an error)

Discussion

Unpublishes this object.


unShare:delegate:


-(void) unShare: (CBEUserId) toUserGroup delegate: (id<UnShareDelegatePtr>) delegate; 
Parameters
shareId

is as mentioned the unique id for a share between the owner and other user/group.

delegate

Pointer to a delegate::UnShareDelegate instance that is implemented by the user.

Discussion

unShare the object to a specific shareId created when sharing. Each share is unique between user/group and the one sharing. This is represented with a unique share id.


unsubscribe:


-(void) unsubscribe:(id<UnsubscribeDelegatePtr>) delegate; 
Parameters
subscribeDelegate

Gets notified when the object has been unsubscribed (or if there was an error)

Discussion

Unsubscribes from this object.


updateKeyValues:keyValues:


-(void) updateKeyValues: (id<UpdateKeyValuesObjectDelegatePtr>) delegate 
        keyValues: (NSDictionary*) keyValues; 
Parameters
delegate

Pointer to a delegate::UpdateKeyValuesDelegate instance that is implemented by the user.

keyValues

Optional map of key/value pairs (metadata).

Discussion

Adds key/value pair data to the object. \note Existing key will be overwritten, otherwise created.