int msg_get_msgsize_opt(msg_handle_t handle, msg_struct_t msg_struct);
int msg_set_msgsize_opt(msg_handle_t handle, msg_struct_t msg_struct);
+// text length calculate
+int msg_calculate_text_length(msg_handle_t handle, const char* msg_text, msg_encode_type_t msg_encode_type, unsigned int *text_size, unsigned int *segment_size);
+
#ifdef __cplusplus
}
#endif
return err;
}
+EXPORT_API int msg_get_conversation(msg_handle_t handle, msg_message_id_t msg_id, msg_struct_t conv)
+{
+ msg_error_t err = MSG_SUCCESS;
+
+ if (handle == NULL || !conv)
+ {
+ MSG_FATAL("handle or opq_msg is NULL");
+ return -EINVAL;
+ }
+
+ MsgHandle* pHandle = (MsgHandle*)handle;
+
+ msg_struct_s *pMsgStruct = (msg_struct_s *)conv;
+ try
+ {
+ err = pHandle->getConversationViewItem(msg_id, (MSG_CONVERSATION_VIEW_S *)pMsgStruct->data);
+ }
+ catch (MsgException& e)
+ {
+ MSG_FATAL("%s", e.what());
+ return MSG_ERR_STORAGE_ERROR;
+ }
+
+ return err;
+}
EXPORT_API int msg_get_folder_view_list(msg_handle_t handle, msg_folder_id_t folder_id, const msg_struct_t sort_rule, msg_struct_list_s *msg_folder_view_list)
{