mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
feat(c-wrapper): remove CPP_TYPE parameter of L_SET_USER_DATA_FROM_C_OBJECT
This commit is contained in:
parent
ccb1828d7d
commit
bd02b8968d
6 changed files with 12 additions and 12 deletions
|
|
@ -489,7 +489,7 @@ void *linphone_call_params_get_user_data (const LinphoneCallParams *cp) {
|
|||
}
|
||||
|
||||
void linphone_call_params_set_user_data (LinphoneCallParams *cp, void *ud) {
|
||||
L_SET_USER_DATA_FROM_C_OBJECT(cp, ud, MediaSessionParams);
|
||||
L_SET_USER_DATA_FROM_C_OBJECT(cp, ud);
|
||||
}
|
||||
|
||||
LinphoneCallParams *linphone_call_params_ref (LinphoneCallParams *cp) {
|
||||
|
|
|
|||
|
|
@ -1178,7 +1178,7 @@ void *linphone_call_get_user_data (const LinphoneCall *call) {
|
|||
}
|
||||
|
||||
void linphone_call_set_user_data (LinphoneCall *call, void *ud) {
|
||||
L_SET_USER_DATA_FROM_C_OBJECT(call, ud, Call);
|
||||
L_SET_USER_DATA_FROM_C_OBJECT(call, ud);
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ void * linphone_chat_message_get_user_data (const LinphoneChatMessage *msg) {
|
|||
}
|
||||
|
||||
void linphone_chat_message_set_user_data (LinphoneChatMessage *msg, void *ud) {
|
||||
L_SET_USER_DATA_FROM_C_OBJECT(msg, ud, ChatMessage);
|
||||
L_SET_USER_DATA_FROM_C_OBJECT(msg, ud);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ void *linphone_chat_room_get_user_data (const LinphoneChatRoom *cr) {
|
|||
}
|
||||
|
||||
void linphone_chat_room_set_user_data (LinphoneChatRoom *cr, void *ud) {
|
||||
L_SET_USER_DATA_FROM_C_OBJECT(cr, ud, ChatRoom);
|
||||
L_SET_USER_DATA_FROM_C_OBJECT(cr, ud);
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ void *linphone_participant_get_user_data(const LinphoneParticipant *participant)
|
|||
}
|
||||
|
||||
void linphone_participant_set_user_data(LinphoneParticipant *participant, void *ud) {
|
||||
L_SET_USER_DATA_FROM_C_OBJECT(participant, ud, Participant);
|
||||
L_SET_USER_DATA_FROM_C_OBJECT(participant, ud);
|
||||
}
|
||||
|
||||
const LinphoneAddress *linphone_participant_get_address (const LinphoneParticipant *participant) {
|
||||
|
|
|
|||
|
|
@ -394,7 +394,7 @@ LINPHONE_END_NAMESPACE
|
|||
// Call the init function of wrapped C object.
|
||||
#define L_INIT(C_TYPE) _linphone_ ## C_TYPE ## _init ()
|
||||
|
||||
// Get the cpp-ptr of a wrapped C object.
|
||||
// Get/set the cpp-ptr of a wrapped C object.
|
||||
#define L_GET_CPP_PTR_FROM_C_OBJECT(C_OBJECT) \
|
||||
LINPHONE_NAMESPACE::Wrapper::getCppPtrFromC< \
|
||||
L_CPP_TYPE_OF_C_OBJECT(C_OBJECT), \
|
||||
|
|
@ -416,19 +416,19 @@ LINPHONE_END_NAMESPACE
|
|||
))
|
||||
|
||||
// Get the wrapped C object of a C++ object.
|
||||
#define L_GET_C_BACK_PTR(OBJECT, C_TYPE) \
|
||||
#define L_GET_C_BACK_PTR(C_OBJECT, C_TYPE) \
|
||||
LINPHONE_NAMESPACE::Wrapper::getCBackPtr<Linphone ## C_TYPE>( \
|
||||
OBJECT, _linphone_ ## C_TYPE ## _init \
|
||||
C_OBJECT, _linphone_ ## C_TYPE ## _init \
|
||||
)
|
||||
|
||||
// Get/set user data on a wrapped C object.
|
||||
#define L_GET_USER_DATA_FROM_C_OBJECT(OBJECT) \
|
||||
#define L_GET_USER_DATA_FROM_C_OBJECT(C_OBJECT) \
|
||||
LINPHONE_NAMESPACE::Wrapper::getUserData( \
|
||||
L_GET_CPP_PTR_FROM_C_OBJECT(OBJECT) \
|
||||
L_GET_CPP_PTR_FROM_C_OBJECT(C_OBJECT) \
|
||||
)
|
||||
#define L_SET_USER_DATA_FROM_C_OBJECT(OBJECT, VALUE, CPP_TYPE) \
|
||||
#define L_SET_USER_DATA_FROM_C_OBJECT(C_OBJECT, VALUE) \
|
||||
LINPHONE_NAMESPACE::Wrapper::setUserData( \
|
||||
L_GET_CPP_PTR_FROM_C_OBJECT(OBJECT), \
|
||||
L_GET_CPP_PTR_FROM_C_OBJECT(C_OBJECT), \
|
||||
VALUE \
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue