mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
Merge branch 'dev_refactor_cpp' of git.linphone.org:linphone into dev_refactor_cpp
This commit is contained in:
commit
237b0f052e
4 changed files with 28 additions and 22 deletions
|
|
@ -105,7 +105,7 @@ typedef struct _LinphoneChatRoomCbs LinphoneChatRoomCbs;
|
|||
* An chat message is the object that is sent and received through LinphoneChatRooms.
|
||||
* @ingroup chatroom
|
||||
*/
|
||||
typedef struct _LinphoneMessage LinphoneMessage;
|
||||
typedef struct _LinphoneChatMessage LinphoneChatMessage;
|
||||
|
||||
/**
|
||||
* An object to handle the callbacks for the handling a LinphoneChatMessage objects.
|
||||
|
|
|
|||
|
|
@ -318,19 +318,6 @@ typedef enum _LinphoneCallStatus {
|
|||
LinphoneCallDeclinedElsewhere /**<The call was declined on another device*/
|
||||
} LinphoneCallStatus;
|
||||
|
||||
/**
|
||||
* A chat room message to hold content to be sent.
|
||||
* Can be created by linphone_chat_room_create_message().
|
||||
* @ingroup chatroom
|
||||
*/
|
||||
typedef struct _LinphoneChatMessage LinphoneChatMessage;
|
||||
|
||||
/**
|
||||
* An object to handle the callbacks for the handling a LinphoneChatMessage objects.
|
||||
* @ingroup chatroom
|
||||
*/
|
||||
typedef struct _LinphoneChatMessageCbs LinphoneChatMessageCbs;
|
||||
|
||||
/**
|
||||
* LinphoneChatMessageState is used to notify if messages have been succesfully delivered or not.
|
||||
* @ingroup chatroom
|
||||
|
|
|
|||
|
|
@ -25,16 +25,32 @@
|
|||
|
||||
// =============================================================================
|
||||
|
||||
#define L_REGISTER_TYPE(C_TYPE) \
|
||||
extern Linphone ## C_TYPE *_linphone_ ## C_TYPE ## _init ();
|
||||
#define L_INIT(C_TYPE) \
|
||||
_linphone_ ## C_TYPE ## _init ()
|
||||
LINPHONE_BEGIN_NAMESPACE
|
||||
|
||||
template<typename CppType, typename CType>
|
||||
struct CppTypeToCType {
|
||||
enum { Defined = false };
|
||||
};
|
||||
|
||||
LINPHONE_END_NAMESPACE
|
||||
|
||||
#define L_REGISTER_TYPE(CPP_TYPE, C_TYPE) \
|
||||
extern Linphone ## C_TYPE *_linphone_ ## C_TYPE ## _init (); \
|
||||
namespace LINPHONE_NAMESPACE { \
|
||||
class CPP_TYPE; \
|
||||
}; \
|
||||
template<> \
|
||||
struct LINPHONE_NAMESPACE::CppTypeToCType<LINPHONE_NAMESPACE::CPP_TYPE, Linphone ## C_TYPE> { \
|
||||
enum { Defined = true }; \
|
||||
typedef C_TYPE cType; \
|
||||
typedef LINPHONE_NAMESPACE::CPP_TYPE cppType; \
|
||||
};
|
||||
|
||||
// =============================================================================
|
||||
|
||||
L_REGISTER_TYPE(Call);
|
||||
L_REGISTER_TYPE(ChatMessage);
|
||||
L_REGISTER_TYPE(ChatRoom);
|
||||
L_REGISTER_TYPE(Participant);
|
||||
L_REGISTER_TYPE(Call, Call);
|
||||
L_REGISTER_TYPE(ChatMessage, ChatMessage);
|
||||
L_REGISTER_TYPE(ChatRoom, ChatRoom);
|
||||
L_REGISTER_TYPE(Participant, Participant);
|
||||
|
||||
#endif // ifndef _C_WRAPPER_H_
|
||||
|
|
|
|||
|
|
@ -350,6 +350,9 @@ LINPHONE_END_NAMESPACE
|
|||
#define L_STRING_TO_C(STR) ((STR).empty() ? NULL : (STR).c_str())
|
||||
#define L_C_TO_STRING(STR) ((STR) == NULL ? std::string() : (STR))
|
||||
|
||||
// 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.
|
||||
#define L_GET_CPP_PTR_FROM_C_STRUCT(OBJECT, CPP_TYPE) \
|
||||
LINPHONE_NAMESPACE::Wrapper::getCppPtrFromC< \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue