Liblinphone  5.3.0
Functions
Chatmessage

Functions

LinphoneChatMessagelinphone_chat_message_ref (LinphoneChatMessage *message)
 Acquire a reference to the chat message. More...
 
void linphone_chat_message_unref (LinphoneChatMessage *message)
 Release reference to the chat message. More...
 
void * linphone_chat_message_get_user_data (const LinphoneChatMessage *message)
 Retrieve the user pointer associated with the chat message. More...
 
void linphone_chat_message_set_user_data (LinphoneChatMessage *message, void *user_data)
 Assign a user pointer to the chat message. More...
 
LinphoneCorelinphone_chat_message_get_core (const LinphoneChatMessage *message)
 Returns back pointer to LinphoneCore object. More...
 
const char * linphone_chat_message_get_external_body_url (const LinphoneChatMessage *message)
 Linphone message can carry external body as defined by rfc2017. More...
 
void linphone_chat_message_set_external_body_url (LinphoneChatMessage *message, const char *external_body_url)
 Linphone message can carry external body as defined by rfc2017. More...
 
time_t linphone_chat_message_get_time (const LinphoneChatMessage *message)
 Get the time the message was sent. More...
 
bool_t linphone_chat_message_is_outgoing (const LinphoneChatMessage *message)
 Returns wehther the message has been sent or received. More...
 
const LinphoneAddresslinphone_chat_message_get_from_address (const LinphoneChatMessage *message)
 Get origin of the message. More...
 
const LinphoneAddresslinphone_chat_message_get_to_address (const LinphoneChatMessage *message)
 Get destination of the message. More...
 
const char * linphone_chat_message_get_content_type (const LinphoneChatMessage *message)
 Get the content type of a chat message. More...
 
void linphone_chat_message_set_content_type (LinphoneChatMessage *message, const char *content_type)
 Set the content type of a chat message. More...
 
const char * linphone_chat_message_get_utf8_text (const LinphoneChatMessage *message)
 Get text part of this message. More...
 
int linphone_chat_message_set_utf8_text (LinphoneChatMessage *message, const char *text)
 Set a chat message text to be sent by linphone_chat_room_send_message(). More...
 
const char * linphone_chat_message_get_message_id (const LinphoneChatMessage *message)
 Get the message identifier. More...
 
const char * linphone_chat_message_get_appdata (const LinphoneChatMessage *message)
 Linphone message has an app-specific field that can store a text. More...
 
void linphone_chat_message_set_appdata (LinphoneChatMessage *message, const char *data)
 Linphone message has an app-specific field that can store a text. More...
 
LinphoneChatRoomlinphone_chat_message_get_chat_room (const LinphoneChatMessage *message)
 Returns the chatroom this message belongs to. More...
 
bool_t linphone_chat_message_get_to_be_stored (const LinphoneChatMessage *message)
 Get if a chat message is to be stored. More...
 
void linphone_chat_message_set_to_be_stored (LinphoneChatMessage *message, bool_t to_be_stored)
 Set if a chat message is to be stored. More...
 
unsigned int linphone_chat_message_store (LinphoneChatMessage *message)
 
LinphoneChatMessageState linphone_chat_message_get_state (const LinphoneChatMessage *message)
 Get the state of the message. More...
 
bool_t linphone_chat_message_is_secured (const LinphoneChatMessage *message)
 Get if the message was encrypted when transfered. More...
 
LinphoneContentlinphone_chat_message_get_file_transfer_information (const LinphoneChatMessage *message)
 Get the file_transfer_information (used by call backs to recover informations during a rcs file transfer) More...
 
bool_t linphone_chat_message_download_content (LinphoneChatMessage *message, LinphoneContent *content)
 Start the download of the LinphoneContent referenced in the LinphoneChatMessage from remote server. More...
 
void linphone_chat_message_cancel_file_transfer (LinphoneChatMessage *message)
 Cancel an ongoing file transfer attached to this message. More...
 
void linphone_chat_message_send (LinphoneChatMessage *message)
 Send a chat message. More...
 
const LinphoneAddresslinphone_chat_message_get_peer_address (const LinphoneChatMessage *message)
 
const LinphoneAddresslinphone_chat_message_get_local_address (const LinphoneChatMessage *message)
 Returns the local address the message was sent or received with. More...
 
void linphone_chat_message_add_custom_header (LinphoneChatMessage *message, const char *header_name, const char *header_value)
 Add custom headers to the message. More...
 
const char * linphone_chat_message_get_custom_header (const LinphoneChatMessage *message, const char *header_name)
 Retrieve a custom header value given its name. More...
 
void linphone_chat_message_remove_custom_header (LinphoneChatMessage *message, const char *header_name)
 Removes a custom header from the message. More...
 
bool_t linphone_chat_message_is_read (const LinphoneChatMessage *message)
 Returns wether the message has been read or not. More...
 
LinphoneReason linphone_chat_message_get_reason (const LinphoneChatMessage *message)
 
const LinphoneErrorInfolinphone_chat_message_get_error_info (const LinphoneChatMessage *message)
 Get full details about delivery error of a chat message. More...
 
bool_t linphone_chat_message_is_forward (LinphoneChatMessage *message)
 Returns wether the chat message is a forward message or not. More...
 
const char * linphone_chat_message_get_forward_info (const LinphoneChatMessage *message)
 Gets the forward info if available as a string. More...
 
bool_t linphone_chat_message_is_reply (LinphoneChatMessage *message)
 Returns wether the chat message is a reply message or not. More...
 
const char * linphone_chat_message_get_reply_message_id (LinphoneChatMessage *message)
 Returns the ID of the message this is a reply to. More...
 
const LinphoneAddresslinphone_chat_message_get_reply_message_sender_address (LinphoneChatMessage *message)
 Returns the address of the sender of the message this is a reply to. More...
 
LinphoneChatMessagelinphone_chat_message_get_reply_message (LinphoneChatMessage *message)
 Returns the LinphoneChatMessage this message is a reply to. More...
 
bool_t linphone_chat_message_is_ephemeral (const LinphoneChatMessage *message)
 Returns wether the chat message is an ephemeral message or not. More...
 
long linphone_chat_message_get_ephemeral_lifetime (const LinphoneChatMessage *message)
 Returns lifetime of an ephemeral message. More...
 
time_t linphone_chat_message_get_ephemeral_expire_time (const LinphoneChatMessage *message)
 Returns the real time at which an ephemeral message expires and will be deleted. More...
 
LinphoneStatus linphone_chat_message_put_char (LinphoneChatMessage *message, uint32_t character)
 Fulfill a chat message char by char. More...
 
void linphone_chat_message_add_callbacks (LinphoneChatMessage *message, LinphoneChatMessageCbs *cbs)
 Add a listener in order to be notified of LinphoneChatMessage events. More...
 
void linphone_chat_message_remove_callbacks (LinphoneChatMessage *message, LinphoneChatMessageCbs *cbs)
 Remove a listener from a LinphoneChatMessage. More...
 
LinphoneChatMessageCbslinphone_chat_message_get_current_callbacks (const LinphoneChatMessage *message)
 Gets the current LinphoneChatMessageCbs. More...
 
void linphone_chat_message_add_file_content (LinphoneChatMessage *message, LinphoneContent *content)
 Adds a file content to the ChatMessage. More...
 
void linphone_chat_message_add_utf8_text_content (LinphoneChatMessage *message, const char *text)
 Creates a LinphoneContent of type PlainText with the given text as body. More...
 
void linphone_chat_message_add_content (LinphoneChatMessage *message, LinphoneContent *content)
 Adds a content to the ChatMessage. More...
 
void linphone_chat_message_remove_content (LinphoneChatMessage *message, LinphoneContent *content)
 Removes a content from the ChatMessage. More...
 
const bctbx_list_t * linphone_chat_message_get_contents (const LinphoneChatMessage *message)
 Returns the list of contents in the message. More...
 
bool_t linphone_chat_message_is_file_transfer_in_progress (const LinphoneChatMessage *message)
 Gets whether or not a file is currently being downloaded or uploaded. More...
 
bctbx_list_t * linphone_chat_message_get_participants_by_imdn_state (const LinphoneChatMessage *message, LinphoneChatMessageState state)
 Gets the list of participants for which the imdn state has reached the specified state and the time at which they did. More...
 
const char * linphone_chat_message_get_call_id (const LinphoneChatMessage *message)
 Gets the callId accociated with the message. More...
 
bctbx_list_t * linphone_chat_message_get_reactions (const LinphoneChatMessage *msg)
 Gets the list of reactions received for this chat message. More...
 
const LinphoneChatMessageReactionlinphone_chat_message_get_own_reaction (const LinphoneChatMessage *msg)
 Returns our own reaction for a given chat message, if any. More...
 
bool_t linphone_chat_message_has_conference_invitation_content (const LinphoneChatMessage *message)
 Returns wether the chat message has a conference invitation content or not. More...
 
LinphoneChatMessageReactionlinphone_chat_message_create_reaction (LinphoneChatMessage *message, const char *utf8_reaction)
 Creates a emoji reaction for the given chat mesage. More...
 
bool_t linphone_chat_message_has_text_content (const LinphoneChatMessage *message)
 Returns wether the chat message has a text content or not. More...
 
MS2_DEPRECATED const char * linphone_chat_message_get_text (const LinphoneChatMessage *message)
 Get text part of this message. More...
 
MS2_DEPRECATED const char * linphone_chat_message_get_file_transfer_filepath (const LinphoneChatMessage *message)
 Get the path to the file to read from or write to during the file transfer. More...
 
MS2_DEPRECATED void linphone_chat_message_start_file_download (LinphoneChatMessage *message, LinphoneChatMessageStateChangedCb status_cb, void *user_data)
 Start the download of the file from remote server. More...
 
MS2_DEPRECATED bool_t linphone_chat_message_download_file (LinphoneChatMessage *message)
 Start the download of the file referenced in a LinphoneChatMessage from remote server. More...
 
MS2_DEPRECATED void linphone_chat_message_resend (LinphoneChatMessage *message)
 Resend a chat message if it is in the 'not delivered' state for whatever reason. More...
 
MS2_DEPRECATED void linphone_chat_message_set_file_transfer_filepath (LinphoneChatMessage *message, const char *filepath)
 Set the path to the file to read from or write to during the file transfer. More...
 
MS2_DEPRECATED LinphoneChatMessageCbslinphone_chat_message_get_callbacks (const LinphoneChatMessage *message)
 Get the LinphoneChatMessageCbs object associated with the LinphoneChatMessage. More...
 
MS2_DEPRECATED int linphone_chat_message_set_text (LinphoneChatMessage *message, const char *text)
 Set a chat message text to be sent by linphone_chat_room_send_message() More...
 
MS2_DEPRECATED const char * linphone_chat_message_get_text_content (const LinphoneChatMessage *message)
 Gets the text content if available as a string. More...
 
MS2_DEPRECATED void linphone_chat_message_add_text_content (LinphoneChatMessage *message, const char *text)
 Creates a LinphoneContent of type PlainText with the given text as body. More...
 
MS2_DEPRECATED bool_t linphone_chat_message_is_file_transfer (const LinphoneChatMessage *message)
 Return whether or not a chat message is a file transfer. More...
 
MS2_DEPRECATED bool_t linphone_chat_message_is_text (const LinphoneChatMessage *message)
 Return whether or not a chat message is a text. More...
 

Detailed Description

Function Documentation

◆ linphone_chat_message_add_callbacks()

void linphone_chat_message_add_callbacks ( LinphoneChatMessage message,
LinphoneChatMessageCbs cbs 
)

Add a listener in order to be notified of LinphoneChatMessage events.

Parameters
messageLinphoneChatMessage object to monitor.
cbsA LinphoneChatMessageCbs object holding the callbacks you need.

◆ linphone_chat_message_add_content()

void linphone_chat_message_add_content ( LinphoneChatMessage message,
LinphoneContent content 
)

Adds a content to the ChatMessage.

Parameters
messageLinphoneChatMessage object.
contentthe LinphoneContent object to add.

◆ linphone_chat_message_add_custom_header()

void linphone_chat_message_add_custom_header ( LinphoneChatMessage message,
const char *  header_name,
const char *  header_value 
)

Add custom headers to the message.

Parameters
messageLinphoneChatMessage object.
header_namename of the header
header_valueheader value

◆ linphone_chat_message_add_file_content()

void linphone_chat_message_add_file_content ( LinphoneChatMessage message,
LinphoneContent content 
)

Adds a file content to the ChatMessage.

Parameters
messageLinphoneChatMessage object.
contentthe LinphoneContent object to add.

◆ linphone_chat_message_add_text_content()

MS2_DEPRECATED void linphone_chat_message_add_text_content ( LinphoneChatMessage message,
const char *  text 
)

Creates a LinphoneContent of type PlainText with the given text as body.

Parameters
messageLinphoneChatMessage object.
textThe text in System Locale to add to the message.
Deprecated:
01/07/2020. Use linphone_chat_message_add_utf8_text_content() instead.

◆ linphone_chat_message_add_utf8_text_content()

void linphone_chat_message_add_utf8_text_content ( LinphoneChatMessage message,
const char *  text 
)

Creates a LinphoneContent of type PlainText with the given text as body.

Introduced in 01/07/2020

Parameters
messageLinphoneChatMessage object.
textThe text in UTF8 to add to the message.

◆ linphone_chat_message_cancel_file_transfer()

void linphone_chat_message_cancel_file_transfer ( LinphoneChatMessage message)

Cancel an ongoing file transfer attached to this message.

(upload or download)

Parameters
messageLinphoneChatMessage object.

◆ linphone_chat_message_create_reaction()

LinphoneChatMessageReaction* linphone_chat_message_create_reaction ( LinphoneChatMessage message,
const char *  utf8_reaction 
)

Creates a emoji reaction for the given chat mesage.

To send it, use linphone_chat_message_reaction_send().

Parameters
messagethe message you want to react on
utf8_reactionthe emoji character(s) as UTF-8.
Returns
a LinphoneChatMessageReaction object.

◆ linphone_chat_message_download_content()

bool_t linphone_chat_message_download_content ( LinphoneChatMessage message,
LinphoneContent content 
)

Start the download of the LinphoneContent referenced in the LinphoneChatMessage from remote server.

Parameters
messageLinphoneChatMessage object.
contentthe LinphoneContent object to download (must have the linphone_content_is_file_transfer() method return TRUE).
Returns
FALSE if there is an error, TRUE otherwise.

◆ linphone_chat_message_download_file()

MS2_DEPRECATED bool_t linphone_chat_message_download_file ( LinphoneChatMessage message)

Start the download of the file referenced in a LinphoneChatMessage from remote server.

Parameters
messageLinphoneChatMessage object.
Deprecated:
12/07/2018 Use linphone_chat_message_download_content() instead

◆ linphone_chat_message_get_appdata()

const char* linphone_chat_message_get_appdata ( const LinphoneChatMessage message)

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.

Parameters
messageLinphoneChatMessage object.
Returns
the application-specific data or NULL if none has been stored.

◆ linphone_chat_message_get_call_id()

const char* linphone_chat_message_get_call_id ( const LinphoneChatMessage message)

Gets the callId accociated with the message.

Parameters
messageLinphoneChatMessage object.
Returns
the call Id

◆ linphone_chat_message_get_callbacks()

MS2_DEPRECATED LinphoneChatMessageCbs* linphone_chat_message_get_callbacks ( const LinphoneChatMessage message)

Get the LinphoneChatMessageCbs object associated with the LinphoneChatMessage.

Parameters
messageLinphoneChatMessage object.
Returns
The LinphoneChatMessageCbs object associated with the LinphoneChatMessage.
Deprecated:
19/02/2019

◆ linphone_chat_message_get_chat_room()

LinphoneChatRoom* linphone_chat_message_get_chat_room ( const LinphoneChatMessage message)

Returns the chatroom this message belongs to.

Parameters
messageLinphoneChatMessage object.
Returns
the LinphoneChatRoom in which this message has been sent or received.

◆ linphone_chat_message_get_content_type()

const char* linphone_chat_message_get_content_type ( const LinphoneChatMessage message)

Get the content type of a chat message.

Parameters
messageLinphoneChatMessage object.
Returns
The content type of the chat message

◆ linphone_chat_message_get_contents()

const bctbx_list_t* linphone_chat_message_get_contents ( const LinphoneChatMessage message)

Returns the list of contents in the message.

Parameters
messageLinphoneChatMessage object.
Returns
The list of LinphoneContent.

◆ linphone_chat_message_get_core()

LinphoneCore* linphone_chat_message_get_core ( const LinphoneChatMessage message)

Returns back pointer to LinphoneCore object.

Parameters
messageLinphoneChatMessage object.
Returns
the LinphoneCore object associated with this message.

◆ linphone_chat_message_get_current_callbacks()

LinphoneChatMessageCbs* linphone_chat_message_get_current_callbacks ( const LinphoneChatMessage message)

Gets the current LinphoneChatMessageCbs.

This is meant only to be called from a callback to be able to get the user_data associated with the LinphoneChatMessageCbs that is calling the callback.

Parameters
messageLinphoneChatMessage object
Returns
The LinphoneChatMessageCbs that has called the last callback.

◆ linphone_chat_message_get_custom_header()

const char* linphone_chat_message_get_custom_header ( const LinphoneChatMessage message,
const char *  header_name 
)

Retrieve a custom header value given its name.

Parameters
messageLinphoneChatMessage object.
header_nameheader name searched
Returns
the custom header value or NULL if not found.

◆ linphone_chat_message_get_ephemeral_expire_time()

time_t linphone_chat_message_get_ephemeral_expire_time ( const LinphoneChatMessage message)

Returns the real time at which an ephemeral message expires and will be deleted.

See also
linphone_chat_message_is_ephemeral()
Parameters
messageLinphoneChatMessage object.
Returns
the time at which an ephemeral message expires. 0 means the message has not been read.

◆ linphone_chat_message_get_ephemeral_lifetime()

long linphone_chat_message_get_ephemeral_lifetime ( const LinphoneChatMessage message)

Returns lifetime of an ephemeral message.

The lifetime is the duration after which the ephemeral message will disappear once viewed.

See also
linphone_chat_message_is_ephemeral()
Parameters
messageLinphoneChatMessage object.
Returns
the lifetime of an ephemeral message, by default 0 (disabled).

◆ linphone_chat_message_get_error_info()

const LinphoneErrorInfo* linphone_chat_message_get_error_info ( const LinphoneChatMessage message)

Get full details about delivery error of a chat message.

Parameters
messageLinphoneChatMessage object.
Returns
a LinphoneErrorInfo describing the details.

◆ linphone_chat_message_get_external_body_url()

const char* linphone_chat_message_get_external_body_url ( const LinphoneChatMessage message)

Linphone message can carry external body as defined by rfc2017.

Parameters
messageLinphoneChatMessage object.
Returns
external body url or NULL if not present.

◆ linphone_chat_message_get_file_transfer_filepath()

MS2_DEPRECATED const char* linphone_chat_message_get_file_transfer_filepath ( const LinphoneChatMessage message)

Get the path to the file to read from or write to during the file transfer.

Parameters
messageLinphoneChatMessage object
Returns
The path to the file to use for the file transfer.
Deprecated:
12/07/2018 use linphone_content_get_file_path() instead.

◆ linphone_chat_message_get_file_transfer_information()

LinphoneContent* linphone_chat_message_get_file_transfer_information ( const LinphoneChatMessage message)

Get the file_transfer_information (used by call backs to recover informations during a rcs file transfer)

Parameters
messageLinphoneChatMessage object.
Returns
a pointer to the LinphoneContent structure or NULL if not present.

◆ linphone_chat_message_get_forward_info()

const char* linphone_chat_message_get_forward_info ( const LinphoneChatMessage message)

Gets the forward info if available as a string.

Parameters
messageLinphoneChatMessage object.
Returns
the original sender of the message if it has been forwarded, NULL otherwise.

◆ linphone_chat_message_get_from_address()

const LinphoneAddress* linphone_chat_message_get_from_address ( const LinphoneChatMessage message)

Get origin of the message.

Parameters
messageLinphoneChatMessage object.
Returns
the LinphoneAddress of the sender.

◆ linphone_chat_message_get_local_address()

const LinphoneAddress* linphone_chat_message_get_local_address ( const LinphoneChatMessage message)

Returns the local address the message was sent or received with.

Parameters
messageLinphoneChatMessage object.
Returns
the LinphoneAddress of the local address used to send/receive this message.

◆ linphone_chat_message_get_message_id()

const char* linphone_chat_message_get_message_id ( const LinphoneChatMessage message)

Get the message identifier.

It is used to identify a message so that it can be notified as delivered and/or displayed.

Parameters
messageLinphoneChatMessage object.
Returns
The message identifier.

◆ linphone_chat_message_get_own_reaction()

const LinphoneChatMessageReaction* linphone_chat_message_get_own_reaction ( const LinphoneChatMessage msg)

Returns our own reaction for a given chat message, if any.

Parameters
messageLinphoneChatMessage object.
Returns
Our own LinphoneChatMessageReaction for that message if any, NULL otherwise.

◆ linphone_chat_message_get_participants_by_imdn_state()

bctbx_list_t* linphone_chat_message_get_participants_by_imdn_state ( const LinphoneChatMessage message,
LinphoneChatMessageState  state 
)

Gets the list of participants for which the imdn state has reached the specified state and the time at which they did.

Parameters
messageLinphoneChatMessage object.
stateThe LinphoneChatMessageState the imdn have reached (only use LinphoneChatMessageStateDelivered, LinphoneChatMessageStateDeliveredToUser, LinphoneChatMessageStateDisplayed and LinphoneChatMessageStateNotDelivered)
Returns
The list of participants.

◆ linphone_chat_message_get_reactions()

bctbx_list_t* linphone_chat_message_get_reactions ( const LinphoneChatMessage msg)

Gets the list of reactions received for this chat message.

Warning: list is ordered by content of reaction message, not by received timestamp!

Parameters
messageLinphoneChatMessage object.
Returns
The sorted list of reaction if any.

◆ linphone_chat_message_get_reply_message()

LinphoneChatMessage* linphone_chat_message_get_reply_message ( LinphoneChatMessage message)

Returns the LinphoneChatMessage this message is a reply to.

Parameters
messageLinphoneChatMessage object.
Returns
the original message LinphoneChatMessage.

◆ linphone_chat_message_get_reply_message_id()

const char* linphone_chat_message_get_reply_message_id ( LinphoneChatMessage message)

Returns the ID of the message this is a reply to.

Parameters
messageLinphoneChatMessage object.
Returns
the original message id.

◆ linphone_chat_message_get_reply_message_sender_address()

const LinphoneAddress* linphone_chat_message_get_reply_message_sender_address ( LinphoneChatMessage message)

Returns the address of the sender of the message this is a reply to.

Parameters
messageLinphoneChatMessage object.
Returns
the original message sender LinphoneAddress.

◆ linphone_chat_message_get_state()

LinphoneChatMessageState linphone_chat_message_get_state ( const LinphoneChatMessage message)

Get the state of the message.

Parameters
messageLinphoneChatMessage object.
Returns
the current LinphoneChatMessageState of the message.

◆ linphone_chat_message_get_text()

MS2_DEPRECATED const char* linphone_chat_message_get_text ( const LinphoneChatMessage message)

Get text part of this message.

Parameters
messageLinphoneChatMessage object.
Returns
text or NULL if no text.
Deprecated:
07/11/2017 use linphone_chat_message_get_utf8_text() instead

◆ linphone_chat_message_get_text_content()

MS2_DEPRECATED const char* linphone_chat_message_get_text_content ( const LinphoneChatMessage message)

Gets the text content if available as a string.

Parameters
messageLinphoneChatMessage object.
Returns
the LinphoneContent buffer if available in System Locale, null otherwise.
Deprecated:
01/07/2020. Use linphone_chat_message_get_utf8_text() instead.

◆ linphone_chat_message_get_time()

time_t linphone_chat_message_get_time ( const LinphoneChatMessage message)

Get the time the message was sent.

Parameters
messageLinphoneChatMessage object.
Returns
the timestamp of when the message was sent.

◆ linphone_chat_message_get_to_address()

const LinphoneAddress* linphone_chat_message_get_to_address ( const LinphoneChatMessage message)

Get destination of the message.

Parameters
messageLinphoneChatMessage object.
Returns
the LinphoneAddress of the recipient.

◆ linphone_chat_message_get_to_be_stored()

bool_t linphone_chat_message_get_to_be_stored ( const LinphoneChatMessage message)

Get if a chat message is to be stored.

Parameters
messageLinphoneChatMessage object.
Returns
Whether or not the message is to be stored

◆ linphone_chat_message_get_user_data()

void* linphone_chat_message_get_user_data ( const LinphoneChatMessage message)

Retrieve the user pointer associated with the chat message.

Parameters
messageLinphoneChatMessage object.
Returns
The user pointer associated with the chat message.

◆ linphone_chat_message_get_utf8_text()

const char* linphone_chat_message_get_utf8_text ( const LinphoneChatMessage message)

Get text part of this message.

Introduced in 01/07/2020

Parameters
messageLinphoneChatMessage object.
Returns
The text in UTF8 or NULL if no text.

◆ linphone_chat_message_has_conference_invitation_content()

bool_t linphone_chat_message_has_conference_invitation_content ( const LinphoneChatMessage message)

Returns wether the chat message has a conference invitation content or not.

Parameters
messageLinphoneChatMessage object.
Returns
TRUE if it has one, FALSE otherwise.

◆ linphone_chat_message_has_text_content()

bool_t linphone_chat_message_has_text_content ( const LinphoneChatMessage message)

Returns wether the chat message has a text content or not.

Parameters
messageLinphoneChatMessage object.
Returns
TRUE if it has one, FALSE otherwise.
Deprecated:
27/10/2020. Check if linphone_chat_message_get_contents() contains a LinphoneContent for which it's content type is PlainText.

◆ linphone_chat_message_is_ephemeral()

bool_t linphone_chat_message_is_ephemeral ( const LinphoneChatMessage message)

Returns wether the chat message is an ephemeral message or not.

An ephemeral message will automatically disappear from the recipient's screen after the message has been viewed.

Parameters
messageLinphoneChatMessage object.
Returns
TRUE if it is an ephemeral message, FALSE otherwise

◆ linphone_chat_message_is_file_transfer()

MS2_DEPRECATED bool_t linphone_chat_message_is_file_transfer ( const LinphoneChatMessage message)

Return whether or not a chat message is a file transfer.

Parameters
messageLinphoneChatMessage object
Returns
Whether or not the message is a file transfer
Deprecated:
06/07/2020 check if linphone_chat_message_get_contents() contains a LinphoneContent for which linphone_content_is_file_transfer() returns TRUE.

◆ linphone_chat_message_is_file_transfer_in_progress()

bool_t linphone_chat_message_is_file_transfer_in_progress ( const LinphoneChatMessage message)

Gets whether or not a file is currently being downloaded or uploaded.

Parameters
messageLinphoneChatMessage object.
Returns
TRUE if download or upload is in progress, FALSE otherwise

◆ linphone_chat_message_is_forward()

bool_t linphone_chat_message_is_forward ( LinphoneChatMessage message)

Returns wether the chat message is a forward message or not.

Parameters
messageLinphoneChatMessage object.
Returns
TRUE if it is a forward message, FALSE otherwise

◆ linphone_chat_message_is_outgoing()

bool_t linphone_chat_message_is_outgoing ( const LinphoneChatMessage message)

Returns wehther the message has been sent or received.

Parameters
messageLinphoneChatMessage object.
Returns
TRUE if message has been sent, FALSE if it has been received.

◆ linphone_chat_message_is_read()

bool_t linphone_chat_message_is_read ( const LinphoneChatMessage message)

Returns wether the message has been read or not.

Parameters
messageLinphoneChatMessage object.
Returns
TRUE if message has been marked as read, FALSE otherwise.

◆ linphone_chat_message_is_reply()

bool_t linphone_chat_message_is_reply ( LinphoneChatMessage message)

Returns wether the chat message is a reply message or not.

Parameters
messageLinphoneChatMessage object.
Returns
TRUE if it is a reply message, FALSE otherwise

◆ linphone_chat_message_is_secured()

bool_t linphone_chat_message_is_secured ( const LinphoneChatMessage message)

Get if the message was encrypted when transfered.

Parameters
messageLinphoneChatMessage object.
Returns
TRUE if the message was encrypted when transfered, FALSE otherwise.

◆ linphone_chat_message_is_text()

MS2_DEPRECATED bool_t linphone_chat_message_is_text ( const LinphoneChatMessage message)

Return whether or not a chat message is a text.

Parameters
messageLinphoneChatMessage object.
Returns
Whether or not the message is a text
Deprecated:
06/07/2020 check if linphone_chat_message_get_contents() contains a LinphoneContent with a PlainText content type.

◆ linphone_chat_message_put_char()

LinphoneStatus linphone_chat_message_put_char ( LinphoneChatMessage message,
uint32_t  character 
)

Fulfill a chat message char by char.

Message linked to a Real Time Text Call send char in realtime following RFC 4103/T.140 To commit a message, use linphone_chat_room_send_message()

Parameters
messageLinphoneChatMessage object.
characterT.140 char
Returns
0 if succeed.

◆ linphone_chat_message_ref()

LinphoneChatMessage* linphone_chat_message_ref ( LinphoneChatMessage message)

Acquire a reference to the chat message.

Parameters
messageLinphoneChatMessage object.
Returns
The same LinphoneChatMessage object.

◆ linphone_chat_message_remove_callbacks()

void linphone_chat_message_remove_callbacks ( LinphoneChatMessage message,
LinphoneChatMessageCbs cbs 
)

Remove a listener from a LinphoneChatMessage.

Parameters
messageLinphoneChatMessage object
cbsLinphoneChatMessageCbs object to remove.

◆ linphone_chat_message_remove_content()

void linphone_chat_message_remove_content ( LinphoneChatMessage message,
LinphoneContent content 
)

Removes a content from the ChatMessage.

Parameters
messageLinphoneChatMessage object.
contentthe LinphoneContent object to remove.

◆ linphone_chat_message_remove_custom_header()

void linphone_chat_message_remove_custom_header ( LinphoneChatMessage message,
const char *  header_name 
)

Removes a custom header from the message.

Parameters
messageLinphoneChatMessage object.
header_namename of the header to remove

◆ linphone_chat_message_resend()

MS2_DEPRECATED void linphone_chat_message_resend ( LinphoneChatMessage message)

Resend a chat message if it is in the 'not delivered' state for whatever reason.

Parameters
messageLinphoneChatMessage object.
Deprecated:
13/10/2017 Use linphone_chat_message_send instead.

◆ linphone_chat_message_send()

void linphone_chat_message_send ( LinphoneChatMessage message)

Send a chat message.

Parameters
messageLinphoneChatMessage object.

◆ linphone_chat_message_set_appdata()

void linphone_chat_message_set_appdata ( LinphoneChatMessage message,
const char *  data 
)

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.

Invoking this function will attempt to update the message storage to reflect the change if it is enabled.

Parameters
messageLinphoneChatMessage object.
datathe data to store into the message.

◆ linphone_chat_message_set_content_type()

void linphone_chat_message_set_content_type ( LinphoneChatMessage message,
const char *  content_type 
)

Set the content type of a chat message.

This content type must match a content that is text representable, such as text/plain, text/html or image/svg+xml.

Parameters
messageLinphoneChatMessage object.
content_typeThe new content type of the chat message

◆ linphone_chat_message_set_external_body_url()

void linphone_chat_message_set_external_body_url ( LinphoneChatMessage message,
const char *  external_body_url 
)

Linphone message can carry external body as defined by rfc2017.

Parameters
messageLinphoneChatMessage object.
external_body_urlex: access-type=URL; URL="http://www.foo.com/file"

◆ linphone_chat_message_set_file_transfer_filepath()

MS2_DEPRECATED void linphone_chat_message_set_file_transfer_filepath ( LinphoneChatMessage message,
const char *  filepath 
)

Set the path to the file to read from or write to during the file transfer.

Parameters
messageLinphoneChatMessage object.
filepathThe path to the file to use for the file transfer.
Deprecated:
12/07/2018 use linphone_content_set_file_path() instead.

◆ linphone_chat_message_set_text()

MS2_DEPRECATED int linphone_chat_message_set_text ( LinphoneChatMessage message,
const char *  text 
)

Set a chat message text to be sent by linphone_chat_room_send_message()

Parameters
messageLinphoneChatMessage
textThe text is in System Locale.
Returns
0 if succeed.
Deprecated:
01/07/2020. Use linphone_chat_message_set_utf8_text() instead.

◆ linphone_chat_message_set_to_be_stored()

void linphone_chat_message_set_to_be_stored ( LinphoneChatMessage message,
bool_t  to_be_stored 
)

Set if a chat message is to be stored.

This content type must match a content that is text representable, such as text/plain, text/html or image/svg+xml.

Parameters
messageLinphoneChatMessage object.
to_be_storedWhether or not the chat message is to be stored

◆ linphone_chat_message_set_user_data()

void linphone_chat_message_set_user_data ( LinphoneChatMessage message,
void *  user_data 
)

Assign a user pointer to the chat message.

Parameters
messageLinphoneChatMessage object.
user_dataThe user pointer to associate with the chat message.

◆ linphone_chat_message_set_utf8_text()

int linphone_chat_message_set_utf8_text ( LinphoneChatMessage message,
const char *  text 
)

Set a chat message text to be sent by linphone_chat_room_send_message().

Introduced in 01/07/2020

Parameters
messageLinphoneChatMessage
textThe text in UTF8 to set.
Returns
0 if succeed.

◆ linphone_chat_message_start_file_download()

MS2_DEPRECATED void linphone_chat_message_start_file_download ( LinphoneChatMessage message,
LinphoneChatMessageStateChangedCb  status_cb,
void *  user_data 
)

Start the download of the file from remote server.

Parameters
messageLinphoneChatMessage object.
status_cb#LinphoneChatMessageStateChangeCb status callback invoked when file is downloaded or could not be downloaded
user_datauser data
Deprecated:
21/09/2017 Use linphone_chat_message_download_file() instead.

◆ linphone_chat_message_unref()

void linphone_chat_message_unref ( LinphoneChatMessage message)

Release reference to the chat message.

Parameters
messageLinphoneChatMessage object.