Set our packages name
This commit is contained in:
parent
978e162de6
commit
83f0cbf045
@ -13,6 +13,7 @@ add_library(tdjni SHARED
|
|||||||
td_jni.cpp
|
td_jni.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(TD_API_JAVA_PACKAGE "it/ernytech/tdlib")
|
||||||
target_include_directories(tdjni PRIVATE ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
|
target_include_directories(tdjni PRIVATE ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
|
||||||
target_link_libraries(tdjni PRIVATE Td::TdStatic ${JAVA_JVM_LIBRARY})
|
target_link_libraries(tdjni PRIVATE Td::TdStatic ${JAVA_JVM_LIBRARY})
|
||||||
target_compile_definitions(tdjni PRIVATE PACKAGE_NAME="${TD_API_JAVA_PACKAGE}")
|
target_compile_definitions(tdjni PRIVATE PACKAGE_NAME="${TD_API_JAVA_PACKAGE}")
|
||||||
|
@ -126,13 +126,13 @@ static jint register_native(JavaVM *vm) {
|
|||||||
reinterpret_cast<void *>(function_ptr));
|
reinterpret_cast<void *>(function_ptr));
|
||||||
};
|
};
|
||||||
|
|
||||||
auto client_class = td::jni::get_jclass(env, PACKAGE_NAME "it/ernytech/tdlib/Client");
|
auto client_class = td::jni::get_jclass(env, PACKAGE_NAME "/Client");
|
||||||
log_class = td::jni::get_jclass(env, PACKAGE_NAME "it/ernytech/tdlib/Log");
|
log_class = td::jni::get_jclass(env, PACKAGE_NAME "/Log");
|
||||||
auto object_class = td::jni::get_jclass(env, PACKAGE_NAME "it/ernytech/tdlib/TdApi$Object");
|
auto object_class = td::jni::get_jclass(env, PACKAGE_NAME "/TdApi$Object");
|
||||||
auto function_class = td::jni::get_jclass(env, PACKAGE_NAME "it/ernytech/tdlib/TdApi$Function");
|
auto function_class = td::jni::get_jclass(env, PACKAGE_NAME "/TdApi$Function");
|
||||||
|
|
||||||
#define TD_OBJECT "L" PACKAGE_NAME "it/ernytech/tdlib/TdApi$Object;"
|
#define TD_OBJECT "L" PACKAGE_NAME "/TdApi$Object;"
|
||||||
#define TD_FUNCTION "L" PACKAGE_NAME "it/ernytech/tdlib/TdApi$Function;"
|
#define TD_FUNCTION "L" PACKAGE_NAME "/TdApi$Function;"
|
||||||
register_method(client_class, "createNativeClient", "()J", Client_createNativeClient);
|
register_method(client_class, "createNativeClient", "()J", Client_createNativeClient);
|
||||||
register_method(client_class, "nativeClientSend", "(JJ" TD_FUNCTION ")V", Client_nativeClientSend);
|
register_method(client_class, "nativeClientSend", "(JJ" TD_FUNCTION ")V", Client_nativeClientSend);
|
||||||
register_method(client_class, "nativeClientReceive", "(J[J[" TD_OBJECT "D)I", Client_nativeClientReceive);
|
register_method(client_class, "nativeClientReceive", "(J[J[" TD_OBJECT "D)I", Client_nativeClientReceive);
|
||||||
|
Loading…
Reference in New Issue
Block a user