Ring Daemon 16.0.0
|
Classes | |
struct | InstantMessageException |
class | MessageEngine |
Typedefs | |
using | MessageToken = uint64_t |
Enumerations | |
enum class | MessageStatus { UNKNOWN =0 , IDLE , SENDING , SENT , FAILURE } |
Functions | |
void | fillPJSIPMessageBody (pjsip_tx_data &tdata, const std::map< std::string, std::string > &payloads) |
std::map< std::string, std::string > | parseSipMessage (const pjsip_msg *msg) |
Parses given SIP message into a map where the key is the contents of the Content-Type header (along with any parameters) and the value is the message payload. | |
void | sendSipMessage (pjsip_inv_session *session, const std::map< std::string, std::string > &payloads) |
Constructs and sends a SIP message. | |
Definition at line 36 of file message_engine.h.
|
strong |
Enumerator | |
---|---|
UNKNOWN | |
IDLE | |
SENDING | |
SENT | |
FAILURE |
Definition at line 38 of file message_engine.h.
void jami::im::fillPJSIPMessageBody | ( | pjsip_tx_data & | tdata, |
const std::map< std::string, std::string > & | payloads | ||
) |
Definition at line 105 of file instant_messaging.cpp.
References jami::createMessageBody(), jami::emitSignal(), JAMI_ERR, and jami::sip_utils::sip_strerror().
Referenced by sendSipMessage().
Parses given SIP message into a map where the key is the contents of the Content-Type header (along with any parameters) and the value is the message payload.
msg | received SIP message |
Definition at line 204 of file instant_messaging.cpp.
References jami::emitSignal(), JAMI_WARN, and jami::parseMessageBody().
Referenced by jami::transaction_request_cb(), and jami::transaction_state_changed_cb().
void jami::im::sendSipMessage | ( | pjsip_inv_session * | session, |
const std::map< std::string, std::string > & | payloads | ||
) |
Constructs and sends a SIP message.
The expected format of the map key is: type/subtype[; *[; arg=value]] eg: "text/plain; id=1234;part=2;of=1001" note: all whitespace is optional
If the map contains more than one pair, then a multipart/mixed message type will be created containing multiple message parts. Note that all of the message parts must be able to fit into one message... they will not be split into multiple messages.
session | SIP session |
payloads | a map where the mime type and optional parameters are the key and the message payload is the value |
Exception: throw InstantMessageException if no message sent
Definition at line 139 of file instant_messaging.cpp.
References jami::emitSignal(), fillPJSIPMessageBody(), JAMI_ERR, JAMI_WARN, jami::sip_utils::SIP_METHODS::MESSAGE, and jami::sip_utils::sip_strerror().