Interface IMessageListing
interface IMessageListing
Extends com.amazon.apmf.IStandard
Message listing.
A message listing is a list of message summary details such as
subject, sender, and date time. Each entry in the message listing
corresponds with a message, and are sorted in chronological descending
order (most recent first). The listing requested from the message
repository can also be filtered by these details. See
IMessageListingFilter.
Methods
retrieveMessage()
Retrieve message corresponding to listing. This is a blocking call until the message is retrieved from the remote device message repository. Privilege: com.amazon.bluetooth.privilege.message_clientIMessage*retrieveMessage()
Returns
IMessage*
Returns a pointer to IMessage
Throws
BluetoothNotConnected— if message provider is not connected.OutOfMemoryError— if failed to make IMessage.TimeoutError— if operation timed out.
getSubject()
string getSubject()
Get message listing subject.
The subject is a summary of the message. The subject string
content varies based on the device: it might contain the original message
title, the first few words of the message, or a blank string.
Privilege: None (IMessageListing is retrieved via
IMessageProvider::getMessageListing() which requires the
com.amazon.bluetooth.privilege.message_client privilege).
Returns
string
Returns the message subject string.
Throws
BluetoothFail— if not specified.OutOfMemoryError— if failed to allocate string.
getDateTime()
com.amazon.apmf.RealTimeInstant getDateTime()
Get message listing date time.
The date time is the timestamp of the sending time if included,
otherwise it is the timestamp of the reception time of the device. If the
message repository supports the UTC offset timestamp format feature, see
MessageRepositoryFeature::UTC_OFFSET_TIMESTAMP_FORMAT. The date time
is UTC time, otherwise the date time is with the remote device
local time.
Privilege: None (IMessageListing is retrieved via
IMessageProvider::getMessageListing() which requires the
com.amazon.bluetooth.privilege.message_client privilege).
Returns
com.amazon.apmf.RealTimeInstant
Returns the message date time.
Throws
BluetoothFail— if not specified.OutOfMemoryError— if failed to make RealTimeInstant.
getSenderName()
string getSenderName()
Get message listing sender name.
The sender name is the sender of the message as known by the
device. If the sender name is not included in the original message, the
contents of the string might vary based on the remote device.
Privilege: None (IMessageListing is retrieved via
IMessageProvider::getMessageListing() which requires the
com.amazon.bluetooth.privilege.message_client privilege).
Returns
string
Returns the message sender name string.
Throws
BluetoothFail— if not specified.OutOfMemoryError— if failed to allocate string.
getSenderAddressing()
string getSenderAddressing()
Get message listing sender addressing.
The sender addressing is the addressing information of the sender.
Contents of the string vary based on the message type:
- email: sender’s email address, for example, the From: field.
- SMS: sender’s phone number.
- MMS: sender’s email address or phone number.
- IM: sender’s UCI identifier, for example, the From: field. If the sender of the message is not known, the string is empty.
Returns
string
Returns the message sender addressing string.
Throws
BluetoothFail— if not specified.OutOfMemoryError— if failed to allocate string.
getReplyToAddressing()
string getReplyToAddressing()
Get message listing reply-to addressing.
The reply-to addressing is the address information for replies to
the sender. This is only used only for emails to deliver the sender’s
reply-to email address, for example, the Reply-To: field. If the reply-to
addressing is not present in the email, the string is empty.
Privilege: None (IMessageListing is retrieved via
IMessageProvider::getMessageListing() which requires the
com.amazon.bluetooth.privilege.message_client privilege).
Returns
string
Returns the message reply-to addressing string.
Throws
BluetoothFail— if not specified.OutOfMemoryError— if failed to allocate string.
getRecipientName()
string getRecipientName()
Get message listing recipient name.
The recipient name is the name of the recipient of the message as
known by the remote device.
Privilege: None (IMessageListing is retrieved via
IMessageProvider::getMessageListing() which requires the
com.amazon.bluetooth.privilege.message_client privilege).
Returns
string
Returns the message recipient name string.
Throws
BluetoothFail— if not specified.OutOfMemoryError— if failed to allocate string.
getRecipientAddressing()
string[] getRecipientAddressing()
Get message listing recipient addressing.
The recipient addressing is the address information of the
recipient. Contents of the string vary based on the message type:
- email: recipient’s email address, or list of email addresses.
- SMS: recipient’s phone number.
- MMS: recipient’s email address or phone number.
- IM: recipient’s UCI identifier, or list of UCI identifiers. If the recipient of the message is not known, the string is empty.
Returns
string[]
Returns an array of message recipient addressing string.
Throws
BluetoothFail— if not specified.OutOfMemoryError— if failed to make array of strings.
getMessageType()
MessageType getMessageType()
Get message listing message type.
Privilege: None (IMessageListing is retrieved via
IMessageProvider::getMessageListing() which requires the
com.amazon.bluetooth.privilege.message_client privilege).
Returns
MessageType
Returns MessageType.
Throws
BluetoothFail— if not specified.
getReceptionStatus()
MessageReceptionStatus getReceptionStatus()
Get message listing reception status.
Privilege: None (IMessageListing is retrieved via
IMessageProvider::getMessageListing() which requires the
com.amazon.bluetooth.privilege.message_client privilege).
Returns
MessageReceptionStatus
Returns MessageReceptionStatus.
Throws
BluetoothFail— if not specified.
getMessageSize()
i32 getMessageSize()
Get message listing message size.
The overall size in bytes of the original message as received from
the network. The size of the message delivered might differ from this due to
transcoding effects.
Privilege: None (IMessageListing is retrieved via
IMessageProvider::getMessageListing() which requires the
com.amazon.bluetooth.privilege.message_client privilege).
Returns
i32
Returns Message size.
Throws
BluetoothFail— if not specified.
getAttachmentSize()
i32 getAttachmentSize()
Get message listing attachment size.
The overall size in bytes of the attachment. Value 0 indicates the
message has no attachments.
Privilege: None (IMessageListing is retrieved via
IMessageProvider::getMessageListing() which requires the
com.amazon.bluetooth.privilege.message_client privilege).
Returns
i32
Returns the message attachment size.
Throws
BluetoothFail— if not specified.
isText()
bool isText()
Get message listing is text.
Indicates that the original message contains textual content or
only binary.
Privilege: None (IMessageListing is retrieved via
IMessageProvider::getMessageListing() which requires the
com.amazon.bluetooth.privilege.message_client privilege).
Returns
bool
Returns true if message is text, false otherwise.
Throws
BluetoothFail— if not specified.
isRead()
bool isRead()
Get message listing read status.
Indicates that the message has been read or not yet been read.
Privilege: None (IMessageListing is retrieved via
IMessageProvider::getMessageListing() which requires the
com.amazon.bluetooth.privilege.message_client privilege).
Returns
bool
Returns true if message has been read, false otherwise.
Throws
BluetoothFail— if not specified.
isSent()
bool isSent()
Get message listing sent status.
Indicates that the message has been sent to the recipient or not
yet been sent.
Privilege: None (IMessageListing is retrieved via
IMessageProvider::getMessageListing() which requires the
com.amazon.bluetooth.privilege.message_client privilege).
Returns
bool
Returns true if message has been sent, false otherwise.
Throws
BluetoothFail— if not specified.
isProtected()
bool isProtected()
Get message listing protected status.
Indicates that the message, or part of the message (for example, the
attachment), is protected by a Digital Rights Management (DRM) scheme.
Privilege: None (IMessageListing is retrieved via
IMessageProvider::getMessageListing() which requires the
com.amazon.bluetooth.privilege.message_client privilege).
Returns
bool
Returns true if message is protected by DRM scheme, false otherwise.
Throws
BluetoothFail— if not specified.
isHighPriority()
bool isHighPriority()
Get message listing priority.
Indicates that the message is of high priority, or not of high
priority.
Privilege: None (IMessageListing is retrieved via
IMessageProvider::getMessageListing() which requires the
com.amazon.bluetooth.privilege.message_client privilege)
Returns
bool
Returns true if message is of high priority, false otherwise.
Throws
BluetoothFail— if not specified.
getDeliveryStatus()
MessageDeliveryStatus getDeliveryStatus()
Get message listing delivery status.
Only available if message repository supports the
MessageRepositoryFeature::MESSAGE_LISTING_FORMAT_VERSION_1_1 feature.
Privilege: None (IMessageListing is retrieved via
IMessageProvider::getMessageListing() which requires the
com.amazon.bluetooth.privilege.message_client privilege).
Returns
MessageDeliveryStatus
Returns MessageDeliveryStatus.
Throws
BluetoothFail— if not specified.
getMessageDirection()
MessageDirection getMessageDirection()
Get message listing direction.
Only available if message repository supports
MessageRepositoryFeature::MESSAGE_LISTING_FORMAT_VERSION_1_1 feature.
Indicates the direction of the message.
Privilege: None (IMessageListing is retrieved via
IMessageProvider::getMessageListing() which requires the
com.amazon.bluetooth.privilege.message_client privilege).
Returns
MessageDirection
Returns MessageDirection.
Throws
BluetoothFail— if not specified.
getAttachmentMediaTypes()
string[] getAttachmentMediaTypes()
Get message listing attachment media types.
Indicates the multipurpose Internet mail extension (MIME) types of
the message attachments. If the message has no attachments, the list is
empty. Only available if message repository supports the
MessageRepositoryFeature::MESSAGE_LISTING_FORMAT_VERSION_1_1 feature.
Privilege: None (IMessageListing is retrieved via
IMessageProvider::getMessageListing() which requires the
com.amazon.bluetooth.privilege.message_client privilege).
Returns
string[]
Returns an array of message attachment media types.
Throws
BluetoothFail— if not specified.OutOfMemoryError— if failed to make array of strings.

