External: LinphoneChatMessage

LinphoneChatMessage

A chat room message to old content to be sent.
Source:

Members

appdata :string

Linphone message has an app-specific field that can store a text. The application might want to use it for keeping data over restarts, like thumbnail image path.
Type:
  • string
Source:

<readonly> chatRoom :external:LinphoneChatRoom

Returns the chatroom this message belongs to.
Type:
Source:

<readonly> errorInfo :external:LinphoneErrorInfo

Get full details about delivery error of a chat message.
Type:
Source:

externalBodyUrl :string

Linphone message can carry external body as defined by rfc2017
Type:
  • string
Source:

fileTransferFilepath :string

Set the path to the file to read from or write to during the file transfer.
Type:
  • string
Source:

<readonly> fileTransferInformation :external:LinphoneContent

Get the file_transfer_information (used by call backs to recover informations during a rcs file transfer)
Type:
  • external:LinphoneContent
Source:

fromAddress :external:LinphoneAddress

Set origin of the message
Type:
Source:

<readonly> localAddress :external:LinphoneAddress

Returns the origin address of a message if it was a outgoing message, or the destination address if it was an incoming message.
Type:
Source:

<readonly> outgoing :boolean

Returns TRUE if the message has been sent, returns FALSE if the message has been received.
Type:
  • boolean
Source:

<readonly> peerAddress :external:LinphoneAddress

Returns the peer (remote) address for the message.
Type:
Source:

<readonly> read :boolean

Returns TRUE if the message has been read, otherwise returns FALSE.
Type:
  • boolean
Source:

<readonly> state :linphone.ChatMessageState

Get the state of the message
Type:
Source:

<readonly> storageId :number

Returns the id used to identify this message in the storage database
Type:
  • number
Source:

<readonly> text :string

Get text part of this message
Type:
  • string
Source:

<readonly> time :external:time_t

Get the time the message was sent.
Type:
  • external:time_t
Source:

toAddress :external:LinphoneAddress

Set destination of the message
Type:
Source:

Methods

addCustomHeader(header_name, header_value) → {void}

Add custom headers to the message.
Parameters:
Name Type Description
header_name string name of the header_name
header_value string header value
Source:
Returns:
Type
void

clone() → {external:LinphoneChatMessage}

Duplicate a LinphoneChatMessage
Source:
Returns:
Type
external:LinphoneChatMessage

getCustomHeader(header_name) → {string}

Retrieve a custom header value given its name.
Parameters:
Name Type Description
header_name string header name searched
Source:
Returns:
Type
string

startFileDownload(status_cb, ud) → {void}

Start the download of the file from remote server
Parameters:
Name Type Description
status_cb external:LinphoneChatMessageStateChangedCb LinphoneChatMessageStateChangeCb status callback invoked when file is downloaded or could not be downloaded
ud void -
Source:
Returns:
Type
void

Events

stateChanged

Call back used to notify message delivery status
Type:
  • object
Properties:
Name Type Description
msg external:LinphoneChatMessage object
state linphone.ChatMessageState LinphoneChatMessageState
ud void application user data
Source: