Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
1b2e103d
Commit
1b2e103d
authored
Sep 22, 2017
by
Ronan
Browse files
feat(c-wrapper): remove CPP_CLASS parameter of L_DECLARE_C_STRUCT_IMPL
parent
bc113345
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/c-wrapper/api/c-call.cpp
View file @
1b2e103d
...
...
@@ -36,7 +36,7 @@ using namespace std;
static
void
_linphone_call_constructor
(
LinphoneCall
*
call
);
static
void
_linphone_call_destructor
(
LinphoneCall
*
call
);
L_DECLARE_C_STRUCT_IMPL_WITH_XTORS
(
Call
,
Call
,
L_DECLARE_C_STRUCT_IMPL_WITH_XTORS
(
Call
,
_linphone_call_constructor
,
_linphone_call_destructor
,
bctbx_list_t
*
callbacks
;
/* A list of LinphoneCallCbs object */
LinphoneCallCbs
*
currentCbs
;
/* The current LinphoneCallCbs object used to call a callback */
...
...
src/c-wrapper/api/c-chat-message.cpp
View file @
1b2e103d
...
...
@@ -38,7 +38,7 @@ using namespace std;
static
void
_linphone_chat_message_constructor
(
LinphoneChatMessage
*
msg
);
static
void
_linphone_chat_message_destructor
(
LinphoneChatMessage
*
msg
);
L_DECLARE_C_STRUCT_IMPL_WITH_XTORS
(
ChatMessage
,
ChatMessage
,
L_DECLARE_C_STRUCT_IMPL_WITH_XTORS
(
ChatMessage
,
_linphone_chat_message_constructor
,
_linphone_chat_message_destructor
,
LinphoneChatMessageCbs
*
cbs
;
LinphoneChatRoom
*
chat_room
;
...
...
src/c-wrapper/api/c-chat-room.cpp
View file @
1b2e103d
...
...
@@ -38,7 +38,7 @@ static void _linphone_chat_room_constructor (LinphoneChatRoom *cr);
static
void
_linphone_chat_room_destructor
(
LinphoneChatRoom
*
cr
);
L_DECLARE_C_STRUCT_IMPL_WITH_XTORS
(
ChatRoom
,
ChatRoom
,
ChatRoom
,
_linphone_chat_room_constructor
,
_linphone_chat_room_destructor
,
LinphoneChatRoomCbs
*
cbs
;
LinphoneAddress
*
peerAddressCache
;
...
...
src/c-wrapper/api/c-participant.cpp
View file @
1b2e103d
...
...
@@ -25,7 +25,7 @@
using
namespace
std
;
L_DECLARE_C_STRUCT_IMPL
(
Participant
,
Participant
,
L_DECLARE_C_STRUCT_IMPL
(
Participant
,
mutable
LinphoneAddress
*
addressCache
;
);
...
...
src/c-wrapper/internal/c-tools.h
View file @
1b2e103d
...
...
@@ -271,11 +271,11 @@ LINPHONE_END_NAMESPACE
#define L_INTERNAL_C_STRUCT_NO_XTOR(OBJECT)
#define L_INTERNAL_DECLARE_C_STRUCT_FUNCTIONS(
CPP_CLASS,
C_TYPE, CONSTRUCTOR, DESTRUCTOR) \
#define L_INTERNAL_DECLARE_C_STRUCT_FUNCTIONS(C_TYPE, CONSTRUCTOR, DESTRUCTOR) \
BELLE_SIP_DECLARE_VPTR_NO_EXPORT(Linphone ## C_TYPE); \
Linphone ## C_TYPE *_linphone_ ## C_TYPE ## _init() { \
Linphone ## C_TYPE * object = belle_sip_object_new(Linphone ## C_TYPE); \
new(&object->cppPtr) std::shared_ptr<L
INPHONE_NAMESPACE::CPP_CLASS
>(); \
new(&object->cppPtr) std::shared_ptr<L
_CPP_TYPE_OF_C_TYPE(C_TYPE)
>(); \
CONSTRUCTOR(object); \
return object; \
} \
...
...
@@ -328,22 +328,22 @@ LINPHONE_END_NAMESPACE
// -----------------------------------------------------------------------------
// Declare wrapped C object with constructor/destructor.
#define L_DECLARE_C_STRUCT_IMPL_WITH_XTORS(
CPP_CLASS,
C_TYPE, CONSTRUCTOR, DESTRUCTOR, ...) \
#define L_DECLARE_C_STRUCT_IMPL_WITH_XTORS(C_TYPE, CONSTRUCTOR, DESTRUCTOR, ...) \
struct _Linphone ## C_TYPE { \
belle_sip_object_t base; \
std::shared_ptr<L
INPHONE_NAMESPACE::CPP_CLASS
> cppPtr; \
std::shared_ptr<L
_CPP_TYPE_OF_C_TYPE(C_TYPE)
> cppPtr; \
__VA_ARGS__ \
}; \
L_INTERNAL_DECLARE_C_STRUCT_FUNCTIONS(
CPP_CLASS,
C_TYPE, CONSTRUCTOR, DESTRUCTOR)
L_INTERNAL_DECLARE_C_STRUCT_FUNCTIONS(C_TYPE, CONSTRUCTOR, DESTRUCTOR)
// Declare wrapped C object.
#define L_DECLARE_C_STRUCT_IMPL(
CPP_CLASS,
C_TYPE, ...) \
#define L_DECLARE_C_STRUCT_IMPL(C_TYPE, ...) \
struct _Linphone ## C_TYPE { \
belle_sip_object_t base; \
std::shared_ptr<L
INPHONE_NAMESPACE::CPP_CLASS
> cppPtr; \
std::shared_ptr<L
_CPP_TYPE_OF_C_TYPE(C_TYPE)
> cppPtr; \
__VA_ARGS__ \
}; \
L_INTERNAL_DECLARE_C_STRUCT_FUNCTIONS(
CPP_CLASS,
C_TYPE, L_INTERNAL_C_STRUCT_NO_XTOR, L_INTERNAL_C_STRUCT_NO_XTOR)
L_INTERNAL_DECLARE_C_STRUCT_FUNCTIONS(C_TYPE, L_INTERNAL_C_STRUCT_NO_XTOR, L_INTERNAL_C_STRUCT_NO_XTOR)
// Declare clonable wrapped C object.
#define L_DECLARE_C_CLONABLE_STRUCT_IMPL(C_TYPE, ...) \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment