Chat room and Messaging 聊天室和訊息傳遞
宏
#define linphone_chat_message_set_from(msg, addr) linphone_chat_message_set_from_address(msg,addr)
#define linphone_chat_message_get_from(msg) linphone_chat_message_get_from_address(msg)
#define linphone_chat_message_set_to(msg, addr) linphone_chat_message_set_to_address(msg, addr)
#define linphone_chat_message_get_to(msg) linphone_chat_message_get_to_addr(msg)
自訂類型
typedef struct _LinphoneChatMessageCbs LinphoneChatMessageCbs
typedef struct _LinphoneChatMessage LinphoneChatMessage
typedef struct _LinphoneChatRoom LinphoneChatRoom
typedef enum _LinphoneChatMessageState LinphoneChatMessageState
typedef enum _LinphoneLimeState LinphoneLimeState
typedef void(* LinphoneChatMessageStateChangedCb)(LinphoneChatMessage *msg,LinphoneChatMessageState state,void *ud)
typedef void(* LinphoneChatMessageCbsMsgStateChangedCb)(LinphoneChatMessge* msg,LinphoneChatMessageState state)
typedef void(* LinphoneChatMessageCbsFileTransferRecvCb)(LinphoneChatMessage *message, const LinphoneContent * content, const LinphoneBuffer *buffer)
typedef LinphoneBuffer* (* LinphoneChatMessageCbsFileTransferSendCb)(LinphoneChatMessage *message, const LinphoneContent *content, size_t offset, size_t size)
typedef void(* LinphoneChatMessageCbsFileTransferProgressIndicationCb)(LinphoneChatMessage *message, const LinphoneContent *content, size_t offset, size_t total)
枚舉類型
enum _LinphoneChatMessageState{
LinphoneChatMessageStateIdle,
LinphoneChatMessageStateInProgress,
LinphoneChatMessageStateDelivered,
LinphoneChatMessageStateNotDelivered,
LinphoneChatMessageStateFileTransferError,
LinphoneChatMessageStateFileTransferDone
}
enum _LinphoneLimeState{
LinphoneLimeDisabled,
LinphoneLimeMandatory,
LinphoneLimePreferred
}
函數
| void |
linphone_core_set_chat_database_path (LinphoneCore *lc, const char *path) |
| |
| const char * |
linphone_core_get_chat_database_path (const LinphoneCore *lc) |
| |
| LinphoneChatRoom * |
linphone_core_get_chat_room (LinphoneCore *lc, const LinphoneAddress *addr) |
| |
| LinphoneChatRoom * |
linphone_core_get_chat_room_from_uri (LinphoneCore *lc, const char *to) |
| |
| void |
linphone_core_delete_chat_room (LinphoneCore *lc, LinphoneChatRoom *cr) |
| |
| void |
linphone_core_disable_chat (LinphoneCore *lc, LinphoneReason deny_reason) |
| |
| void |
linphone_core_enable_chat (LinphoneCore *lc) |
| |
| bool_t |
linphone_core_chat_enabled (const LinphoneCore *lc) |
| |
| MS2_DEPRECATED void |
linphone_chat_room_destroy (LinphoneChatRoom *cr) |
| |
| LinphoneChatMessage * |
linphone_chat_room_create_message (LinphoneChatRoom *cr, const char *message) |
| |
| LinphoneChatMessage * |
linphone_chat_room_create_message_2 (LinphoneChatRoom *cr, const char *message, const char *external_body_url,LinphoneChatMessageState state, time_t time, bool_t is_read, bool_t is_incoming) |
| |
| LinphoneChatRoom * |
linphone_chat_room_ref (LinphoneChatRoom *cr) |
| |
| void |
linphone_chat_room_unref (LinphoneChatRoom *cr) |
| |
| void * |
linphone_chat_room_get_user_data (const LinphoneChatRoom *cr) |
| |
| void |
linphone_chat_room_set_user_data (LinphoneChatRoom *cr, void *ud) |
| |
| LinphoneChatMessage * |
linphone_chat_room_create_file_transfer_message (LinphoneChatRoom *cr, const LinphoneContent*initial_content) |
| |
| const LinphoneAddress * |
linphone_chat_room_get_peer_address (LinphoneChatRoom *cr) |
| |
| MS2_DEPRECATED void |
linphone_chat_room_send_message (LinphoneChatRoom *cr, const char *msg) |
| |
| MS2_DEPRECATED void |