From 3d4821c69e2212a6345553dcd7d8f52700a11007 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Thu, 28 Aug 2014 15:11:17 +0200 Subject: [PATCH] Renamed get_to(), set_to(), get_from() and set_from() respectively to get_to_address(), set_to_address(), get_from_address() and set_from_address(). --- coreapi/chat.c | 24 ++++++++++++------------ coreapi/linphonecore.c | 10 +++++++--- coreapi/linphonecore.h | 24 +++++++++++++++++------- 3 files changed, 36 insertions(+), 22 deletions(-) diff --git a/coreapi/chat.c b/coreapi/chat.c index 2891fafd5..d662ed20a 100644 --- a/coreapi/chat.c +++ b/coreapi/chat.c @@ -1169,39 +1169,39 @@ void linphone_chat_room_cancel_file_transfer(LinphoneChatMessage *msg) { /** * Set origin of the message - *@param message #LinphoneChatMessage obj - *@param from #LinphoneAddress origin of this message (copied) + * @param[in] message #LinphoneChatMessage obj + * @param[in] from #LinphoneAddress origin of this message (copied) */ -void linphone_chat_message_set_from(LinphoneChatMessage* message, const LinphoneAddress* from) { +void linphone_chat_message_set_from_address(LinphoneChatMessage* message, const LinphoneAddress* from) { if(message->from) linphone_address_destroy(message->from); message->from=linphone_address_clone(from); } /** * Get origin of the message - *@param message #LinphoneChatMessage obj - *@return #LinphoneAddress + * @param[in] message #LinphoneChatMessage obj + * @return #LinphoneAddress */ -const LinphoneAddress* linphone_chat_message_get_from(const LinphoneChatMessage* message) { +const LinphoneAddress* linphone_chat_message_get_from_address(const LinphoneChatMessage* message) { return message->from; } /** * Set destination of the message - *@param message #LinphoneChatMessage obj - *@param to #LinphoneAddress destination of this message (copied) + * @param[in] message #LinphoneChatMessage obj + * @param[in] to #LinphoneAddress destination of this message (copied) */ -void linphone_chat_message_set_to(LinphoneChatMessage* message, const LinphoneAddress* to) { +void linphone_chat_message_set_to_address(LinphoneChatMessage* message, const LinphoneAddress* to) { if(message->to) linphone_address_destroy(message->to); message->to=linphone_address_clone(to); } /** * Get destination of the message - *@param message #LinphoneChatMessage obj - *@return #LinphoneAddress + * @param[in] message #LinphoneChatMessage obj + * @return #LinphoneAddress */ -const LinphoneAddress* linphone_chat_message_get_to(const LinphoneChatMessage* message){ +const LinphoneAddress* linphone_chat_message_get_to_address(const LinphoneChatMessage* message){ if (message->to) return message->to; if (message->dir==LinphoneChatMessageOutgoing){ return message->chat_room->peer_url; diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index cbc9be067..e05737040 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -328,16 +328,20 @@ const char *linphone_call_log_get_ref_key(const LinphoneCallLog *cl){ } /** - * Returns origin (ie from) address of the call. + * Returns origin address (ie from) of the call. + * @param[in] cl LinphoneCallLog object + * @return The origin address (ie from) of the call. **/ -LinphoneAddress *linphone_call_log_get_from(LinphoneCallLog *cl){ +LinphoneAddress *linphone_call_log_get_from_address(LinphoneCallLog *cl){ return cl->from; } /** * Returns destination address (ie to) of the call. + * @param[in] cl LinphoneCallLog object + * @return The destination address (ie to) of the call. **/ -LinphoneAddress *linphone_call_log_get_to(LinphoneCallLog *cl){ +LinphoneAddress *linphone_call_log_get_to_address(LinphoneCallLog *cl){ return cl->to; } diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 415645812..4e6523a05 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -389,8 +389,12 @@ typedef enum _LinphoneMediaEncryption LinphoneMediaEncryption; LINPHONE_PUBLIC const char *linphone_media_encryption_to_string(LinphoneMediaEncryption menc); /*public: */ -LINPHONE_PUBLIC LinphoneAddress *linphone_call_log_get_from(LinphoneCallLog *cl); -LINPHONE_PUBLIC LinphoneAddress *linphone_call_log_get_to(LinphoneCallLog *cl); +/** @deprecated Use linphone_call_log_get_from_address() instead. */ +#define linphone_call_log_get_from(cl) linphone_call_log_get_from_address(cl) +LINPHONE_PUBLIC LinphoneAddress *linphone_call_log_get_from_address(LinphoneCallLog *cl); +/** @deprecated Use linphone_call_log_get_to_address() instead. */ +#define linphone_call_log_get_to(cl) linphone_call_log_get_to_address(cl) +LINPHONE_PUBLIC LinphoneAddress *linphone_call_log_get_to_address(LinphoneCallLog *cl); LINPHONE_PUBLIC LinphoneAddress *linphone_call_log_get_remote_address(LinphoneCallLog *cl); LINPHONE_PUBLIC LinphoneCallDir linphone_call_log_get_dir(LinphoneCallLog *cl); LINPHONE_PUBLIC LinphoneCallStatus linphone_call_log_get_status(LinphoneCallLog *cl); @@ -574,7 +578,6 @@ LINPHONE_PUBLIC void linphone_info_message_add_header(LinphoneInfoMessage *im, c LINPHONE_PUBLIC const char *linphone_info_message_get_header(const LinphoneInfoMessage *im, const char *name); LINPHONE_PUBLIC void linphone_info_message_set_content(LinphoneInfoMessage *im, const LinphoneContent *content); LINPHONE_PUBLIC const LinphoneContent * linphone_info_message_get_content(const LinphoneInfoMessage *im); -LINPHONE_PUBLIC const char *linphone_info_message_get_from(const LinphoneInfoMessage *im); LINPHONE_PUBLIC void linphone_info_message_destroy(LinphoneInfoMessage *im); LINPHONE_PUBLIC LinphoneInfoMessage *linphone_info_message_copy(const LinphoneInfoMessage *orig); @@ -1467,10 +1470,17 @@ LINPHONE_PUBLIC LinphoneChatMessage* linphone_chat_message_clone(const LinphoneC LINPHONE_PUBLIC LinphoneChatMessage * linphone_chat_message_ref(LinphoneChatMessage *msg); LINPHONE_PUBLIC void linphone_chat_message_unref(LinphoneChatMessage *msg); LINPHONE_PUBLIC void linphone_chat_message_destroy(LinphoneChatMessage* msg); -LINPHONE_PUBLIC void linphone_chat_message_set_from(LinphoneChatMessage* message, const LinphoneAddress* from); -LINPHONE_PUBLIC const LinphoneAddress* linphone_chat_message_get_from(const LinphoneChatMessage* message); -LINPHONE_PUBLIC void linphone_chat_message_set_to(LinphoneChatMessage* message, const LinphoneAddress* from); -LINPHONE_PUBLIC const LinphoneAddress* linphone_chat_message_get_to(const LinphoneChatMessage* message); +/** @deprecated Use linphone_chat_message_set_from_address() instead. */ +#define linphone_chat_message_set_from(msg, addr) linphone_chat_message_set_from_address(msg, addr) +LINPHONE_PUBLIC void linphone_chat_message_set_from_address(LinphoneChatMessage* message, const LinphoneAddress* addr); +/** @deprecated Use linphone_chat_message_get_from_address() instead. */ +#define linphone_chat_message_get_from(msg) linphone_chat_message_get_from_address(msg) +LINPHONE_PUBLIC const LinphoneAddress* linphone_chat_message_get_from_address(const LinphoneChatMessage* message); +#define linphone_chat_message_set_to(msg, addr) linphone_chat_message_set_to_address(msg, addr) +LINPHONE_PUBLIC void linphone_chat_message_set_to_address(LinphoneChatMessage* message, const LinphoneAddress* addr); +/** @deprecated Use linphone_chat_message_get_to_address() instead. */ +#define linphone_chat_message_get_to(msg) linphone_chat_message_get_to_address(msg) +LINPHONE_PUBLIC const LinphoneAddress* linphone_chat_message_get_to_address(const LinphoneChatMessage* message); LINPHONE_PUBLIC const char* linphone_chat_message_get_external_body_url(const LinphoneChatMessage* message); LINPHONE_PUBLIC void linphone_chat_message_set_external_body_url(LinphoneChatMessage* message,const char* url); LINPHONE_PUBLIC const LinphoneContent* linphone_chat_message_get_file_transfer_information(const LinphoneChatMessage* message);