Commit def3a31e authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Do not wrap IMEE + fix java wrapper compil when using -j + fixed classBl in...

Do not wrap IMEE + fix java wrapper compil when using -j + fixed classBl in abstractAPI tool + various fixes for jni layer of java wrapper
parent 57626a75
...@@ -206,9 +206,6 @@ if(ENABLE_STATIC) ...@@ -206,9 +206,6 @@ if(ENABLE_STATIC)
add_dependencies(linphone-static liblinphone-git-version) add_dependencies(linphone-static liblinphone-git-version)
target_include_directories(linphone-static PUBLIC ${LINPHONE_INCLUDE_DIRS}) target_include_directories(linphone-static PUBLIC ${LINPHONE_INCLUDE_DIRS})
target_link_libraries(linphone-static INTERFACE ${LIBS}) target_link_libraries(linphone-static INTERFACE ${LIBS})
if(ANDROID)
add_dependencies(linphone-static linphonecore-jni-header)
endif()
if(IOS) if(IOS)
target_link_libraries(linphone-static INTERFACE "-framework Foundation" "-framework AVFoundation") target_link_libraries(linphone-static INTERFACE "-framework Foundation" "-framework AVFoundation")
endif() endif()
...@@ -254,6 +251,7 @@ if(ENABLE_SHARED) ...@@ -254,6 +251,7 @@ if(ENABLE_SHARED)
set_target_properties(linphone PROPERTIES PREFIX "lib") set_target_properties(linphone PROPERTIES PREFIX "lib")
elseif(ANDROID) elseif(ANDROID)
target_link_libraries(linphone PUBLIC "log" ${SUPPORT_LIBRARIES} ${CPUFEATURES_LIBRARIES}) target_link_libraries(linphone PUBLIC "log" ${SUPPORT_LIBRARIES} ${CPUFEATURES_LIBRARIES})
add_dependencies(linphone linphonej)
endif() endif()
if(MSVC) if(MSVC)
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
......
...@@ -78,6 +78,7 @@ LINPHONE_PUBLIC LinphoneChatMessage* linphone_chat_room_create_message(LinphoneC ...@@ -78,6 +78,7 @@ LINPHONE_PUBLIC LinphoneChatMessage* linphone_chat_room_create_message(LinphoneC
* @param is_read TRUE if the message should be flagged as read, FALSE otherwise. * @param is_read TRUE if the message should be flagged as read, FALSE otherwise.
* @param is_incoming TRUE if the message has been received, FALSE otherwise. * @param is_incoming TRUE if the message has been received, FALSE otherwise.
* @return a new #LinphoneChatMessage * @return a new #LinphoneChatMessage
* @donotwrap
*/ */
LINPHONE_PUBLIC LinphoneChatMessage* linphone_chat_room_create_message_2(LinphoneChatRoom *cr, const char* message, const char* external_body_url, LinphoneChatMessageState state, time_t time, bool_t is_read, bool_t is_incoming); LINPHONE_PUBLIC LinphoneChatMessage* linphone_chat_room_create_message_2(LinphoneChatRoom *cr, const char* message, const char* external_body_url, LinphoneChatMessageState state, time_t time, bool_t is_read, bool_t is_incoming);
......
...@@ -35,12 +35,14 @@ extern "C" { ...@@ -35,12 +35,14 @@ extern "C" {
* Acquire a reference to the LinphoneImEncryptionEngineCbs. * Acquire a reference to the LinphoneImEncryptionEngineCbs.
* @param[in] cbs LinphoneImEncryptionEngineCbs object. * @param[in] cbs LinphoneImEncryptionEngineCbs object.
* @return The same LinphoneImEncryptionEngineCbs object. * @return The same LinphoneImEncryptionEngineCbs object.
* @donotwrap
**/ **/
LinphoneImEncryptionEngineCbs * linphone_im_encryption_engine_cbs_ref(LinphoneImEncryptionEngineCbs *cbs); LinphoneImEncryptionEngineCbs * linphone_im_encryption_engine_cbs_ref(LinphoneImEncryptionEngineCbs *cbs);
/** /**
* Release reference to the LinphoneImEncryptionEngineCbs. * Release reference to the LinphoneImEncryptionEngineCbs.
* @param[in] cbs LinphoneImEncryptionEngineCbs object. * @param[in] cbs LinphoneImEncryptionEngineCbs object.
* @donotwrap
**/ **/
void linphone_im_encryption_engine_cbs_unref(LinphoneImEncryptionEngineCbs *cbs); void linphone_im_encryption_engine_cbs_unref(LinphoneImEncryptionEngineCbs *cbs);
...@@ -48,6 +50,7 @@ void linphone_im_encryption_engine_cbs_unref(LinphoneImEncryptionEngineCbs *cbs) ...@@ -48,6 +50,7 @@ void linphone_im_encryption_engine_cbs_unref(LinphoneImEncryptionEngineCbs *cbs)
* Gets the user data in the LinphoneImEncryptionEngineCbs object * Gets the user data in the LinphoneImEncryptionEngineCbs object
* @param[in] cbs the LinphoneImEncryptionEngineCbs * @param[in] cbs the LinphoneImEncryptionEngineCbs
* @return the user data * @return the user data
* @donotwrap
*/ */
LINPHONE_PUBLIC void *linphone_im_encryption_engine_cbs_get_user_data(const LinphoneImEncryptionEngineCbs *cbs); LINPHONE_PUBLIC void *linphone_im_encryption_engine_cbs_get_user_data(const LinphoneImEncryptionEngineCbs *cbs);
...@@ -55,6 +58,7 @@ LINPHONE_PUBLIC void *linphone_im_encryption_engine_cbs_get_user_data(const Linp ...@@ -55,6 +58,7 @@ LINPHONE_PUBLIC void *linphone_im_encryption_engine_cbs_get_user_data(const Linp
* Sets the user data in the LinphoneImEncryptionEngineCbs object * Sets the user data in the LinphoneImEncryptionEngineCbs object
* @param[in] cbs the LinphoneImEncryptionEngineCbs object * @param[in] cbs the LinphoneImEncryptionEngineCbs object
* @param[in] data the user data * @param[in] data the user data
* @donotwrap
*/ */
LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_user_data(LinphoneImEncryptionEngineCbs *cbs, void *data); LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_user_data(LinphoneImEncryptionEngineCbs *cbs, void *data);
...@@ -62,12 +66,14 @@ LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_user_data(LinphoneImE ...@@ -62,12 +66,14 @@ LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_user_data(LinphoneImE
* Acquire a reference to the LinphoneImEncryptionEngine. * Acquire a reference to the LinphoneImEncryptionEngine.
* @param[in] imee LinphoneImEncryptionEngine object. * @param[in] imee LinphoneImEncryptionEngine object.
* @return The same LinphoneImEncryptionEngine object. * @return The same LinphoneImEncryptionEngine object.
* @donotwrap
**/ **/
LINPHONE_PUBLIC LinphoneImEncryptionEngine * linphone_im_encryption_engine_ref(LinphoneImEncryptionEngine *imee); LINPHONE_PUBLIC LinphoneImEncryptionEngine * linphone_im_encryption_engine_ref(LinphoneImEncryptionEngine *imee);
/** /**
* Release reference to the LinphoneImEncryptionEngine. * Release reference to the LinphoneImEncryptionEngine.
* @param[in] imee LinphoneImEncryptionEngine object. * @param[in] imee LinphoneImEncryptionEngine object.
* @donotwrap
**/ **/
LINPHONE_PUBLIC void linphone_im_encryption_engine_unref(LinphoneImEncryptionEngine *imee); LINPHONE_PUBLIC void linphone_im_encryption_engine_unref(LinphoneImEncryptionEngine *imee);
...@@ -75,6 +81,7 @@ LINPHONE_PUBLIC void linphone_im_encryption_engine_unref(LinphoneImEncryptionEng ...@@ -75,6 +81,7 @@ LINPHONE_PUBLIC void linphone_im_encryption_engine_unref(LinphoneImEncryptionEng
* Gets the user data in the LinphoneImEncryptionEngine object * Gets the user data in the LinphoneImEncryptionEngine object
* @param[in] imee the LinphoneImEncryptionEngine * @param[in] imee the LinphoneImEncryptionEngine
* @return the user data * @return the user data
* @donotwrap
*/ */
LINPHONE_PUBLIC void *linphone_im_encryption_engine_get_user_data(const LinphoneImEncryptionEngine *imee); LINPHONE_PUBLIC void *linphone_im_encryption_engine_get_user_data(const LinphoneImEncryptionEngine *imee);
...@@ -82,6 +89,7 @@ LINPHONE_PUBLIC void *linphone_im_encryption_engine_get_user_data(const Linphone ...@@ -82,6 +89,7 @@ LINPHONE_PUBLIC void *linphone_im_encryption_engine_get_user_data(const Linphone
* Sets the user data in the LinphoneImEncryptionEngine object * Sets the user data in the LinphoneImEncryptionEngine object
* @param[in] imee the LinphoneImEncryptionEngine object * @param[in] imee the LinphoneImEncryptionEngine object
* @param[in] data the user data * @param[in] data the user data
* @donotwrap
*/ */
LINPHONE_PUBLIC void linphone_im_encryption_engine_set_user_data(LinphoneImEncryptionEngine *imee, void *data); LINPHONE_PUBLIC void linphone_im_encryption_engine_set_user_data(LinphoneImEncryptionEngine *imee, void *data);
...@@ -89,6 +97,7 @@ LINPHONE_PUBLIC void linphone_im_encryption_engine_set_user_data(LinphoneImEncry ...@@ -89,6 +97,7 @@ LINPHONE_PUBLIC void linphone_im_encryption_engine_set_user_data(LinphoneImEncry
* Gets the LinphoneCore object that created the IM encryption engine * Gets the LinphoneCore object that created the IM encryption engine
* @param[in] imee LinphoneImEncryptionEngine object * @param[in] imee LinphoneImEncryptionEngine object
* @return The LinphoneCore object that created the IM encryption engine * @return The LinphoneCore object that created the IM encryption engine
* @donotwrap
*/ */
LINPHONE_PUBLIC LinphoneCore * linphone_im_encryption_engine_get_core(LinphoneImEncryptionEngine *imee); LINPHONE_PUBLIC LinphoneCore * linphone_im_encryption_engine_get_core(LinphoneImEncryptionEngine *imee);
...@@ -96,6 +105,7 @@ LINPHONE_PUBLIC LinphoneCore * linphone_im_encryption_engine_get_core(LinphoneIm ...@@ -96,6 +105,7 @@ LINPHONE_PUBLIC LinphoneCore * linphone_im_encryption_engine_get_core(LinphoneIm
* Gets the LinphoneImEncryptionEngineCbs object that holds the callbacks * Gets the LinphoneImEncryptionEngineCbs object that holds the callbacks
* @param[in] imee the LinphoneImEncryptionEngine object * @param[in] imee the LinphoneImEncryptionEngine object
* @return the LinphoneImEncryptionEngineCbs object * @return the LinphoneImEncryptionEngineCbs object
* @donotwrap
*/ */
LINPHONE_PUBLIC LinphoneImEncryptionEngineCbs* linphone_im_encryption_engine_get_callbacks(const LinphoneImEncryptionEngine *imee); LINPHONE_PUBLIC LinphoneImEncryptionEngineCbs* linphone_im_encryption_engine_get_callbacks(const LinphoneImEncryptionEngine *imee);
...@@ -103,6 +113,7 @@ LINPHONE_PUBLIC LinphoneImEncryptionEngineCbs* linphone_im_encryption_engine_get ...@@ -103,6 +113,7 @@ LINPHONE_PUBLIC LinphoneImEncryptionEngineCbs* linphone_im_encryption_engine_get
* Gets the callback that will decrypt the chat messages upon reception * Gets the callback that will decrypt the chat messages upon reception
* @param[in] cbs the LinphoneImEncryptionEngineCbs object * @param[in] cbs the LinphoneImEncryptionEngineCbs object
* @return the callback * @return the callback
* @donotwrap
*/ */
LINPHONE_PUBLIC LinphoneImEncryptionEngineCbsIncomingMessageCb linphone_im_encryption_engine_cbs_get_process_incoming_message(LinphoneImEncryptionEngineCbs *cbs); LINPHONE_PUBLIC LinphoneImEncryptionEngineCbsIncomingMessageCb linphone_im_encryption_engine_cbs_get_process_incoming_message(LinphoneImEncryptionEngineCbs *cbs);
...@@ -110,6 +121,7 @@ LINPHONE_PUBLIC LinphoneImEncryptionEngineCbsIncomingMessageCb linphone_im_encry ...@@ -110,6 +121,7 @@ LINPHONE_PUBLIC LinphoneImEncryptionEngineCbsIncomingMessageCb linphone_im_encry
* Sets the callback that will decrypt the chat messages upon reception * Sets the callback that will decrypt the chat messages upon reception
* @param[in] cbs the LinphoneImEncryptionEngineCbs object * @param[in] cbs the LinphoneImEncryptionEngineCbs object
* @param[in] cb the callback to call * @param[in] cb the callback to call
* @donotwrap
*/ */
LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_process_incoming_message(LinphoneImEncryptionEngineCbs *cbs, LinphoneImEncryptionEngineCbsIncomingMessageCb cb); LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_process_incoming_message(LinphoneImEncryptionEngineCbs *cbs, LinphoneImEncryptionEngineCbsIncomingMessageCb cb);
...@@ -117,6 +129,7 @@ LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_process_incoming_mess ...@@ -117,6 +129,7 @@ LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_process_incoming_mess
* Gets the callback that will encrypt the chat messages before sending them * Gets the callback that will encrypt the chat messages before sending them
* @param[in] cbs the LinphoneImEncryptionEngineCbs object * @param[in] cbs the LinphoneImEncryptionEngineCbs object
* @return the callback * @return the callback
* @donotwrap
*/ */
LINPHONE_PUBLIC LinphoneImEncryptionEngineCbsOutgoingMessageCb linphone_im_encryption_engine_cbs_get_process_outgoing_message(LinphoneImEncryptionEngineCbs *cbs); LINPHONE_PUBLIC LinphoneImEncryptionEngineCbsOutgoingMessageCb linphone_im_encryption_engine_cbs_get_process_outgoing_message(LinphoneImEncryptionEngineCbs *cbs);
...@@ -124,6 +137,7 @@ LINPHONE_PUBLIC LinphoneImEncryptionEngineCbsOutgoingMessageCb linphone_im_encry ...@@ -124,6 +137,7 @@ LINPHONE_PUBLIC LinphoneImEncryptionEngineCbsOutgoingMessageCb linphone_im_encry
* Sets the callback that will encrypt the chat messages before sending them * Sets the callback that will encrypt the chat messages before sending them
* @param[in] cbs the LinphoneImEncryptionEngineCbs object * @param[in] cbs the LinphoneImEncryptionEngineCbs object
* @param[in] cb the callback to call * @param[in] cb the callback to call
* @donotwrap
*/ */
LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_process_outgoing_message(LinphoneImEncryptionEngineCbs *cbs, LinphoneImEncryptionEngineCbsOutgoingMessageCb cb); LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_process_outgoing_message(LinphoneImEncryptionEngineCbs *cbs, LinphoneImEncryptionEngineCbsOutgoingMessageCb cb);
...@@ -131,6 +145,7 @@ LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_process_outgoing_mess ...@@ -131,6 +145,7 @@ LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_process_outgoing_mess
* Gets the callback that will decrypt the files while downloading them * Gets the callback that will decrypt the files while downloading them
* @param[in] cbs the LinphoneImEncryptionEngineCbs object * @param[in] cbs the LinphoneImEncryptionEngineCbs object
* @return the callback * @return the callback
* @donotwrap
*/ */
LINPHONE_PUBLIC LinphoneImEncryptionEngineCbsDownloadingFileCb linphone_im_encryption_engine_cbs_get_process_downloading_file(LinphoneImEncryptionEngineCbs *cbs); LINPHONE_PUBLIC LinphoneImEncryptionEngineCbsDownloadingFileCb linphone_im_encryption_engine_cbs_get_process_downloading_file(LinphoneImEncryptionEngineCbs *cbs);
...@@ -138,6 +153,7 @@ LINPHONE_PUBLIC LinphoneImEncryptionEngineCbsDownloadingFileCb linphone_im_encry ...@@ -138,6 +153,7 @@ LINPHONE_PUBLIC LinphoneImEncryptionEngineCbsDownloadingFileCb linphone_im_encry
* Sets the callback that will decrypt the files while downloading them * Sets the callback that will decrypt the files while downloading them
* @param[in] cbs the LinphoneImEncryptionEngineCbs object * @param[in] cbs the LinphoneImEncryptionEngineCbs object
* @param[in] cb the callback to call * @param[in] cb the callback to call
* @donotwrap
*/ */
LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_process_downloading_file(LinphoneImEncryptionEngineCbs *cbs, LinphoneImEncryptionEngineCbsDownloadingFileCb cb); LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_process_downloading_file(LinphoneImEncryptionEngineCbs *cbs, LinphoneImEncryptionEngineCbsDownloadingFileCb cb);
...@@ -145,6 +161,7 @@ LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_process_downloading_f ...@@ -145,6 +161,7 @@ LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_process_downloading_f
* Gets the callback that will will encrypt the files while uploading them * Gets the callback that will will encrypt the files while uploading them
* @param[in] cbs the LinphoneImEncryptionEngineCbs object * @param[in] cbs the LinphoneImEncryptionEngineCbs object
* @return the callback * @return the callback
* @donotwrap
*/ */
LINPHONE_PUBLIC LinphoneImEncryptionEngineCbsUploadingFileCb linphone_im_encryption_engine_cbs_get_process_uploading_file(LinphoneImEncryptionEngineCbs *cbs); LINPHONE_PUBLIC LinphoneImEncryptionEngineCbsUploadingFileCb linphone_im_encryption_engine_cbs_get_process_uploading_file(LinphoneImEncryptionEngineCbs *cbs);
...@@ -152,6 +169,7 @@ LINPHONE_PUBLIC LinphoneImEncryptionEngineCbsUploadingFileCb linphone_im_encrypt ...@@ -152,6 +169,7 @@ LINPHONE_PUBLIC LinphoneImEncryptionEngineCbsUploadingFileCb linphone_im_encrypt
* Sets the callback that will encrypt the files while uploading them * Sets the callback that will encrypt the files while uploading them
* @param[in] cbs the LinphoneImEncryptionEngineCbs object * @param[in] cbs the LinphoneImEncryptionEngineCbs object
* @param[in] cb the callback to call * @param[in] cb the callback to call
* @donotwrap
*/ */
LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_process_uploading_file(LinphoneImEncryptionEngineCbs *cbs, LinphoneImEncryptionEngineCbsUploadingFileCb cb); LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_process_uploading_file(LinphoneImEncryptionEngineCbs *cbs, LinphoneImEncryptionEngineCbsUploadingFileCb cb);
...@@ -159,6 +177,7 @@ LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_process_uploading_fil ...@@ -159,6 +177,7 @@ LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_process_uploading_fil
* Gets the callback telling wheter or not to encrypt the files * Gets the callback telling wheter or not to encrypt the files
* @param[in] cbs the LinphoneImEncryptionEngineCbs object * @param[in] cbs the LinphoneImEncryptionEngineCbs object
* @return the callback * @return the callback
* @donotwrap
*/ */
LINPHONE_PUBLIC LinphoneImEncryptionEngineCbsIsEncryptionEnabledForFileTransferCb linphone_im_encryption_engine_cbs_get_is_encryption_enabled_for_file_transfer(LinphoneImEncryptionEngineCbs *cbs); LINPHONE_PUBLIC LinphoneImEncryptionEngineCbsIsEncryptionEnabledForFileTransferCb linphone_im_encryption_engine_cbs_get_is_encryption_enabled_for_file_transfer(LinphoneImEncryptionEngineCbs *cbs);
...@@ -166,6 +185,7 @@ LINPHONE_PUBLIC LinphoneImEncryptionEngineCbsIsEncryptionEnabledForFileTransferC ...@@ -166,6 +185,7 @@ LINPHONE_PUBLIC LinphoneImEncryptionEngineCbsIsEncryptionEnabledForFileTransferC
* Sets the callback telling wheter or not to encrypt the files * Sets the callback telling wheter or not to encrypt the files
* @param[in] cbs the LinphoneImEncryptionEngineCbs object * @param[in] cbs the LinphoneImEncryptionEngineCbs object
* @param[in] cb the callback to call * @param[in] cb the callback to call
* @donotwrap
*/ */
LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_is_encryption_enabled_for_file_transfer(LinphoneImEncryptionEngineCbs *cbs, LinphoneImEncryptionEngineCbsIsEncryptionEnabledForFileTransferCb cb); LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_is_encryption_enabled_for_file_transfer(LinphoneImEncryptionEngineCbs *cbs, LinphoneImEncryptionEngineCbsIsEncryptionEnabledForFileTransferCb cb);
...@@ -173,6 +193,7 @@ LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_is_encryption_enabled ...@@ -173,6 +193,7 @@ LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_is_encryption_enabled
* Gets the callback that will generate the key to encrypt the file before uploading it * Gets the callback that will generate the key to encrypt the file before uploading it
* @param[in] cbs the LinphoneImEncryptionEngineCbs object * @param[in] cbs the LinphoneImEncryptionEngineCbs object
* @return the callback * @return the callback
* @donotwrap
*/ */
LINPHONE_PUBLIC LinphoneImEncryptionEngineCbsGenerateFileTransferKeyCb linphone_im_encryption_engine_cbs_get_generate_file_transfer_key(LinphoneImEncryptionEngineCbs *cbs); LINPHONE_PUBLIC LinphoneImEncryptionEngineCbsGenerateFileTransferKeyCb linphone_im_encryption_engine_cbs_get_generate_file_transfer_key(LinphoneImEncryptionEngineCbs *cbs);
...@@ -180,6 +201,7 @@ LINPHONE_PUBLIC LinphoneImEncryptionEngineCbsGenerateFileTransferKeyCb linphone_ ...@@ -180,6 +201,7 @@ LINPHONE_PUBLIC LinphoneImEncryptionEngineCbsGenerateFileTransferKeyCb linphone_
* Sets the callback that will generate the key to encrypt the file before uploading it * Sets the callback that will generate the key to encrypt the file before uploading it
* @param[in] cbs the LinphoneImEncryptionEngineCbs object * @param[in] cbs the LinphoneImEncryptionEngineCbs object
* @param[in] cb the callback to call * @param[in] cb the callback to call
* @donotwrap
*/ */
LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_generate_file_transfer_key(LinphoneImEncryptionEngineCbs *cbs, LinphoneImEncryptionEngineCbsGenerateFileTransferKeyCb cb); LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_generate_file_transfer_key(LinphoneImEncryptionEngineCbs *cbs, LinphoneImEncryptionEngineCbsGenerateFileTransferKeyCb cb);
...@@ -187,12 +209,14 @@ LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_generate_file_transfe ...@@ -187,12 +209,14 @@ LINPHONE_PUBLIC void linphone_im_encryption_engine_cbs_set_generate_file_transfe
* @param[in] msg LinphoneChatMessage * @param[in] msg LinphoneChatMessage
* @param[in] text Const char * * @param[in] text Const char *
* @returns 0 if succeed. * @returns 0 if succeed.
* @donotwrap
*/ */
LINPHONE_PUBLIC int linphone_chat_message_set_text(LinphoneChatMessage *msg, const char* text); LINPHONE_PUBLIC int linphone_chat_message_set_text(LinphoneChatMessage *msg, const char* text);
/** /**
* Create the IM encryption engine * Create the IM encryption engine
* @return The created the IM encryption engine * @return The created the IM encryption engine
* @donotwrap
*/ */
LINPHONE_PUBLIC LinphoneImEncryptionEngine *linphone_im_encryption_engine_new(void); LINPHONE_PUBLIC LinphoneImEncryptionEngine *linphone_im_encryption_engine_new(void);
......
...@@ -446,7 +446,7 @@ class Interface(DocumentableObject): ...@@ -446,7 +446,7 @@ class Interface(DocumentableObject):
class CParser(object): class CParser(object):
def __init__(self, cProject): def __init__(self, cProject, classBlAppend=[]):
self.cBaseType = ['void', 'bool_t', 'char', 'short', 'int', 'long', 'size_t', 'time_t', 'float', 'double', 'LinphoneStatus'] self.cBaseType = ['void', 'bool_t', 'char', 'short', 'int', 'long', 'size_t', 'time_t', 'float', 'double', 'LinphoneStatus']
self.cListType = 'bctbx_list_t' self.cListType = 'bctbx_list_t'
self.regexFixedSizeInteger = '^(u?)int(\d?\d)_t$' self.regexFixedSizeInteger = '^(u?)int(\d?\d)_t$'
...@@ -457,6 +457,8 @@ class CParser(object): ...@@ -457,6 +457,8 @@ class CParser(object):
'linphone_vcard_get_belcard'] # manualy wrapped 'linphone_vcard_get_belcard'] # manualy wrapped
self.classBl = ['LpConfig'] # temporarly blacklisted self.classBl = ['LpConfig'] # temporarly blacklisted
for bl in classBlAppend:
self.classBl.append(bl)
# list of classes that must be concidered as refcountable even if # list of classes that must be concidered as refcountable even if
# they are no ref()/unref() methods # they are no ref()/unref() methods
......
...@@ -116,11 +116,21 @@ class JavaTranslator(object): ...@@ -116,11 +116,21 @@ class JavaTranslator(object):
return 'V' return 'V'
return _type return _type
def translate_as_c_base_type(self, _type): def translate_as_c_base_type(self, t):
_type = t.name
if _type == 'string': if _type == 'string':
return 'const char *' return 'char *'
elif _type == 'integer': elif _type == 'integer':
return 'int' if t.size is None:
if t.isUnsigned:
return 'unsigned int'
return 'int'
inttype = 'int{0}_t'.format(t.size)
if t.isUnsigned:
inttype = 'u' + inttype
if t.isref:
inttype = inttype + ' *'
return inttype
elif _type == 'boolean': elif _type == 'boolean':
return 'bool_t' return 'bool_t'
elif _type == 'floatant': elif _type == 'floatant':
...@@ -132,11 +142,13 @@ class JavaTranslator(object): ...@@ -132,11 +142,13 @@ class JavaTranslator(object):
elif _type == 'status': elif _type == 'status':
return 'int' return 'int'
elif _type == 'string_array': elif _type == 'string_array':
return 'const char **' return 'char **'
elif _type == 'character': elif _type == 'character':
return 'char' return 'char'
elif _type == 'void': elif _type == 'void':
return 'void *' if t.isref:
return 'void *'
return 'void'
return _type return _type
def translate_type(self, _type, native=False, jni=False, isReturn=False): def translate_type(self, _type, native=False, jni=False, isReturn=False):
...@@ -145,6 +157,8 @@ class JavaTranslator(object): ...@@ -145,6 +157,8 @@ class JavaTranslator(object):
if type(_type.containedTypeDesc) is AbsApi.ClassType: if type(_type.containedTypeDesc) is AbsApi.ClassType:
return 'jobjectArray' return 'jobjectArray'
elif type(_type.containedTypeDesc) is AbsApi.BaseType: elif type(_type.containedTypeDesc) is AbsApi.BaseType:
if _type.containedTypeDesc.name == 'string':
return 'jobjectArray'
return self.translate_type(_type.containedTypeDesc, jni=True) + 'Array' return self.translate_type(_type.containedTypeDesc, jni=True) + 'Array'
elif type(_type.containedTypeDesc) is AbsApi.EnumType: elif type(_type.containedTypeDesc) is AbsApi.EnumType:
ptrtype = self.translate_type(_type.containedTypeDesc, native) ptrtype = self.translate_type(_type.containedTypeDesc, native)
...@@ -322,7 +336,8 @@ class JavaTranslator(object): ...@@ -322,7 +336,8 @@ class JavaTranslator(object):
methodDict['return'] = self.translate_type(_method.returnType, jni=True, isReturn=True) methodDict['return'] = self.translate_type(_method.returnType, jni=True, isReturn=True)
methodDict['hasListReturn'] = methodDict['return'] == 'jobjectArray' methodDict['hasListReturn'] = methodDict['return'] == 'jobjectArray'
methodDict['hasReturn'] = not methodDict['return'] == 'void' and not methodDict['hasListReturn'] methodDict['hasReturn'] = not methodDict['return'] == 'void' and not methodDict['hasListReturn']
methodDict['hasNormalReturn'] = not methodDict['hasListReturn'] methodDict['hasStringReturn'] = methodDict['return'] == 'jstring'
methodDict['hasNormalReturn'] = not methodDict['hasListReturn'] and not methodDict['hasStringReturn']
methodDict['name'] = 'Java_' + self.jni_package + className.to_camel_case() + 'Impl_' + _method.name.to_camel_case(lower=True) methodDict['name'] = 'Java_' + self.jni_package + className.to_camel_case() + 'Impl_' + _method.name.to_camel_case(lower=True)
methodDict['notStatic'] = not static methodDict['notStatic'] = not static
methodDict['c_name'] = 'linphone_' + className.to_snake_case() + "_" + _method.name.to_snake_case() methodDict['c_name'] = 'linphone_' + className.to_snake_case() + "_" + _method.name.to_snake_case()
...@@ -332,7 +347,9 @@ class JavaTranslator(object): ...@@ -332,7 +347,9 @@ class JavaTranslator(object):
methodDict['isStringObjectArray'] = False methodDict['isStringObjectArray'] = False
if methodDict['hasListReturn']: if methodDict['hasListReturn']:
if _method.returnType.name == 'string_array': if type(_method.returnType) is AbsApi.BaseType and _method.returnType.name == 'string_array':
methodDict['isStringObjectArray'] = True
elif type(_method.returnType.containedTypeDesc) is AbsApi.BaseType:
methodDict['isStringObjectArray'] = True methodDict['isStringObjectArray'] = True
elif type(_method.returnType.containedTypeDesc) is AbsApi.ClassType: elif type(_method.returnType.containedTypeDesc) is AbsApi.ClassType:
methodDict['isRealObjectArray'] = True methodDict['isRealObjectArray'] = True
...@@ -340,8 +357,6 @@ class JavaTranslator(object): ...@@ -340,8 +357,6 @@ class JavaTranslator(object):
methodDict['objectClassCName'] = 'Linphone' + _method.returnType.containedTypeDesc.desc.name.to_camel_case() methodDict['objectClassCName'] = 'Linphone' + _method.returnType.containedTypeDesc.desc.name.to_camel_case()
methodDict['objectClassName'] = _method.returnType.containedTypeDesc.desc.name.to_camel_case() methodDict['objectClassName'] = _method.returnType.containedTypeDesc.desc.name.to_camel_case()
methodDict['objectClassImplName'] = _method.returnType.containedTypeDesc.desc.name.to_camel_case() + 'Impl' methodDict['objectClassImplName'] = _method.returnType.containedTypeDesc.desc.name.to_camel_case() + 'Impl'
else:
print 'toto'
methodDict['params'] = 'JNIEnv *env, jobject thiz' if static else 'JNIEnv *env, jobject thiz, jlong ptr' methodDict['params'] = 'JNIEnv *env, jobject thiz' if static else 'JNIEnv *env, jobject thiz, jlong ptr'
methodDict['params_impl'] = '' methodDict['params_impl'] = ''
...@@ -352,18 +367,26 @@ class JavaTranslator(object): ...@@ -352,18 +367,26 @@ class JavaTranslator(object):
methodDict['returnedObjectGetter'] = '' methodDict['returnedObjectGetter'] = ''
for arg in _method.args: for arg in _method.args:
methodDict['params'] += ', ' methodDict['params'] += ', '
methodDict['params_impl'] += ', ' if static:
if arg is not _method.args[0]:
methodDict['params_impl'] += ', '
else:
methodDict['params_impl'] += ', '
methodDict['params'] += self.translate_argument(arg, jni=True) methodDict['params'] += self.translate_argument(arg, jni=True)
argname = self.translate_argument_name(arg.name) argname = self.translate_argument_name(arg.name)
if type(arg.type) is AbsApi.ClassType: if type(arg.type) is AbsApi.ClassType:
methodDict['objects'].append({'object': argname, 'objectClassCName': 'Linphone' + arg.type.desc.name.to_camel_case()}) classCName = 'Linphone' + arg.type.desc.name.to_camel_case()
if classCName[-8:] == 'Listener':
classCName = 'Linphone' + arg.type.desc.name.to_camel_case()[:-8] + 'Cbs'
methodDict['objects'].append({'object': argname, 'objectClassCName': classCName})
methodDict['params_impl'] += 'c_' + argname methodDict['params_impl'] += 'c_' + argname
elif type(arg.type) is AbsApi.ListType: elif type(arg.type) is AbsApi.ListType:
isStringList = type(arg.type.containedTypeDesc) is AbsApi.BaseType and arg.type.containedTypeDesc.name == 'string' isStringList = type(arg.type.containedTypeDesc) is AbsApi.BaseType and arg.type.containedTypeDesc.name == 'string'
isObjList = type(arg.type.containedTypeDesc) is AbsApi.ClassType isObjList = type(arg.type.containedTypeDesc) is AbsApi.ClassType
methodDict['lists'].append({'list': argname, 'isStringList': isStringList, 'isObjList': isObjList}) methodDict['lists'].append({'list': argname, 'isStringList': isStringList, 'isObjList': isObjList, 'objectClassCName': arg.type.containedTypeDesc.name})
methodDict['params_impl'] += 'bctbx_list_' + argname methodDict['params_impl'] += 'bctbx_list_' + argname
elif type(arg.type) is AbsApi.EnumType: elif type(arg.type) is AbsApi.EnumType:
...@@ -375,7 +398,7 @@ class JavaTranslator(object): ...@@ -375,7 +398,7 @@ class JavaTranslator(object):
methodDict['strings'].append({'string': argname}) methodDict['strings'].append({'string': argname})
methodDict['params_impl'] += 'c_' + argname methodDict['params_impl'] += 'c_' + argname
else: else:
methodDict['params_impl'] += argname methodDict['params_impl'] += '(' + self.translate_as_c_base_type(arg.type) + ')' + argname
else: else:
methodDict['params_impl'] += argname methodDict['params_impl'] += argname
...@@ -434,14 +457,18 @@ class JavaTranslator(object): ...@@ -434,14 +457,18 @@ class JavaTranslator(object):
methodDict['className'] = className.to_camel_case() methodDict['className'] = className.to_camel_case()
methodDict['classImplName'] = className.to_camel_case() + 'Impl' methodDict['classImplName'] = className.to_camel_case() + 'Impl'
methodDict['jniPath'] = self.jni_path methodDict['jniPath'] = self.jni_path
methodDict['cPrefix'] = 'linphone_' + className.to_snake_case() methodDict['cPrefix'] = 'linphone_' + className.to_snake_case()[:-9] # Remove _listener at the end
methodDict['callbackName'] = methodDict['cPrefix'] + '_' + _method.name.to_snake_case() methodDict['callbackName'] = methodDict['cPrefix'] + '_' + _method.name.to_snake_case()
methodDict['jname'] = _method.name.to_camel_case(lower=True) methodDict['jname'] = _method.name.to_camel_case(lower=True)
methodDict['return'] = self.translate_type(_method.returnType, jni=True, isReturn=True) methodDict['return'] = self.translate_as_c_base_type(_method.returnType)
if type(_method.returnType) is AbsApi.ClassType:
methodDict['return'] += '*'
methodDict['returnIfFail'] = '' if methodDict['return'] == 'void' else ' NULL' #TODO
methodDict['hasReturn'] = not methodDict['return'] == 'void'
methodDict['isSingleListener'] = not _class.multilistener methodDict['isSingleListener'] = not _class.multilistener
methodDict['isMultiListener'] = _class.multilistener methodDict['isMultiListener'] = _class.multilistener
methodDict['firstParam'] = ''
methodDict['jobjects'] = [] methodDict['jobjects'] = []
methodDict['jenums'] = [] methodDict['jenums'] = []
methodDict['jstrings'] = [] methodDict['jstrings'] = []
...@@ -453,14 +480,19 @@ class JavaTranslator(object): ...@@ -453,14 +480,19 @@ class JavaTranslator(object):
if arg is not _method.args[0]: if arg is not _method.args[0]:
methodDict['params'] += ', ' methodDict['params'] += ', '
methodDict['params_impl'] += ', ' methodDict['params_impl'] += ', '
else:
methodDict['firstParam'] = argname
if (arg.type.isconst):
methodDict['params'] += 'const '
if type(arg.type) is AbsApi.ClassType: if type(arg.type) is AbsApi.ClassType:
methodDict['params'] += 'Linphone' + arg.type.desc.name.to_camel_case() + ' *' + (argname if arg is not _method.args[0] else 'cptr') methodDict['params'] += 'Linphone' + arg.type.desc.name.to_camel_case() + ' *' + argname
methodDict['jparams'] += 'L' + self.jni_path + arg.type.desc.name.to_camel_case() + ';' methodDict['jparams'] += 'L' + self.jni_path + arg.type.desc.name.to_camel_case() + ';'
methodDict['params_impl'] += 'j_' + argname methodDict['params_impl'] += 'j_' + argname
methodDict['jobjects'].append({'objectName': argname, 'className': arg.type.desc.name.to_camel_case(),}) methodDict['jobjects'].append({'objectName': argname, 'className': arg.type.desc.name.to_camel_case(), })
elif type(arg.type) is AbsApi.BaseType: elif type(arg.type) is AbsApi.BaseType:
methodDict['params'] += self.translate_as_c_base_type(arg.type.name) + ' ' + argname methodDict['params'] += self.translate_as_c_base_type(arg.type) + ' ' + argname
methodDict['jparams'] += self.translate_java_jni_base_type_name(arg.type.name) methodDict['jparams'] += self.translate_java_jni_base_type_name(arg.type.name)
if arg.type.name == 'string': if arg.type.name == 'string':
methodDict['params_impl'] += 'j_' + argname methodDict['params_impl'] += 'j_' + argname
...@@ -551,7 +583,7 @@ class JniInterface(object): ...@@ -551,7 +583,7 @@ class JniInterface(object):
self.callbacks = [] self.callbacks = []
listener = apiClass.listenerInterface listener = apiClass.listenerInterface
for method in listener.methods: for method in listener.methods:
cb = 'linphone_' + listener.name.to_snake_case() cb = 'linphone_' + listener.name.to_snake_case()[:-9] # Remove _listener at the end
cbName = cb + '_' + method.name.to_snake_case() cbName = cb + '_' + method.name.to_snake_case()