mirror of
https://github.com/ErnyTech-Archive/JTDLib
synced 2024-11-23 03:06:48 +01:00
Set our packages name
This commit is contained in:
parent
552db21bb4
commit
27c45df3d5
@ -13,6 +13,7 @@ add_library(tdjni SHARED
|
||||
td_jni.cpp
|
||||
)
|
||||
|
||||
set(TD_API_JAVA_PACKAGE "it/ernytech/tdlib")
|
||||
target_include_directories(tdjni PRIVATE ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
|
||||
target_link_libraries(tdjni PRIVATE Td::TdStatic ${JAVA_JVM_LIBRARY})
|
||||
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));
|
||||
};
|
||||
|
||||
auto client_class = td::jni::get_jclass(env, PACKAGE_NAME "it/ernytech/tdlib/Client");
|
||||
log_class = td::jni::get_jclass(env, PACKAGE_NAME "it/ernytech/tdlib/Log");
|
||||
auto object_class = td::jni::get_jclass(env, PACKAGE_NAME "it/ernytech/tdlib/TdApi$Object");
|
||||
auto function_class = td::jni::get_jclass(env, PACKAGE_NAME "it/ernytech/tdlib/TdApi$Function");
|
||||
auto client_class = td::jni::get_jclass(env, PACKAGE_NAME "/Client");
|
||||
log_class = td::jni::get_jclass(env, PACKAGE_NAME "/Log");
|
||||
auto object_class = td::jni::get_jclass(env, PACKAGE_NAME "/TdApi$Object");
|
||||
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_FUNCTION "L" PACKAGE_NAME "it/ernytech/tdlib/TdApi$Function;"
|
||||
#define TD_OBJECT "L" PACKAGE_NAME "/TdApi$Object;"
|
||||
#define TD_FUNCTION "L" PACKAGE_NAME "/TdApi$Function;"
|
||||
register_method(client_class, "createNativeClient", "()J", Client_createNativeClient);
|
||||
register_method(client_class, "nativeClientSend", "(JJ" TD_FUNCTION ")V", Client_nativeClientSend);
|
||||
register_method(client_class, "nativeClientReceive", "(J[J[" TD_OBJECT "D)I", Client_nativeClientReceive);
|
||||
|
Loading…
Reference in New Issue
Block a user