BlackBerry Spark Communications Services for iOS  1.11.0
BBMChatMessageFileProgress Class Reference
Inheritance diagram for BBMChatMessageFileProgress:
BBMElement BBMElementBase


unsigned long long bytes
NSString * chatId
NSString * messageId
unsigned long long total
- Properties inherited from BBMElement
BBMElementState bbmState
NSString * primaryKey
- Properties inherited from BBMElementBase
 The container (BBMLiveList or BBMLiveMap) holding this element. More...

Additional Inherited Members

- Instance Methods inherited from BBMElementBase
(BBMDSModel *) - masterModel
(id) - objectForKeyedSubscript:
- Class Methods inherited from BBMElementBase
(NSString *) + identifierOfElement:

Detailed Description

This list reports upload and download progress information for active 'chatMessage' file attachment transfers.

Each item in this list corresponds to a single 'chatMessage' entry and is identified by the same key fields: 'chatId' and 'messageId'. When an entry exists in this list, bbmcore is actively trying to upload or download the attached file. The fields of the entry in this list indicate the progress bbmcore has made in that active transfer. When an entry is removed from this list, bbmcore is no longer actively trying to transfer it. When a transfer attempt fails, it will not be represented in this list until bbmcore retries it, but the associated 'chatMessage' 'fileState' will still be 'Transferring'.

Changes in this list will be reported only when the previously reported value of 'bytes' and the current value of 'bytes' differ enough that the progress towards the 'total' achieves a different 5% increment.

For example, if a file was 100 bytes in 'total' and the previous report was 37 'bytes', then a change would only be reported for this entry after 'bytes' reached at least 40. A change from 37 to 39 would not be reported by bbmcore because 'bytes' must reach at least 40 to move from the 35-40% increment to the 40-45% (or higher) increment.

Your application doesn't have to wait for a change in 'bytes' to get an initial progress value for an active transfer it has previously been ignoring. Your application can query the list directly with 'requestListElements' at any time. When such a request returns no entry for a given pair of ids, it means that bbmcore isn't currently trying to upload or download the attached file or no progress information is available for the transfer. (See the caveat on 'total'.)


Property Documentation

◆ bytes

- (unsigned long long) bytes

The number of bytes transferred so far in this attempt.Your application must not depend on this reaching 'total' to mean the transfer succeeded or completed. Use the 'fileState' of the actual 'chatMessage' to determine the overall transfer state.


◆ chatId

- (NSString*) chatId

Holds the id of the chat that contains the attachment's message.


◆ messageId

- (NSString*) messageId

Holds the id of the message (within that chat referred to by 'chatId') whose attachment's transfer progress is being reported.


◆ total

- (unsigned long long) total

The total number of bytes expected in the transfer.If for some reason the total number of bytes cannot be determined or if the total number of bytes is zero, the transfer will not report progress via this list. This doesn't mean that bbmcore isn't trying to perform the transfer in such cases.Thus, this value is never zero and never changes until the list element is removed.