mirror of
https://github.com/hpd840321/craftlabs-authorization-sdk.git
synced 2026-06-09 10:00:30 +08:00
refactor(native): rename C API auth_* -> craft_* across header, core, JNI bridge, and smoke tests
This commit is contained in:
@@ -10,25 +10,25 @@
|
||||
#include <cstdlib>
|
||||
|
||||
int main() {
|
||||
AuthHandle h = auth_initialize("{}");
|
||||
AuthHandle h = craft_initialize("{}");
|
||||
if (!h) {
|
||||
std::fprintf(stderr, "auth_initialize returned null\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
AuthResult r = auth_check_license(h);
|
||||
AuthResult r = craft_check_license(h);
|
||||
if (r.success == 0) {
|
||||
std::fprintf(stderr, "auth_check_license failed\n");
|
||||
auth_destroy(h);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
LicenseInfo* info = auth_get_license_info(h);
|
||||
LicenseInfo* info = craft_get_license_info(h);
|
||||
if (!info) {
|
||||
std::fprintf(stderr, "auth_get_license_info returned null\n");
|
||||
auth_destroy(h);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
auth_free_license_info(info);
|
||||
auth_destroy(h);
|
||||
craft_free_license_info(info);
|
||||
craft_destroy(h);
|
||||
std::printf("native smoke ok\n");
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user