Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## Next

* Refactor symbol generation and LookupProvider registration logic.
* Modify symbol files for Tizen 6.0, 6.5, 7.0, 8.0, 9.0, 10.0.
* Separate `tizen` getter into each module's getter.
* Change `final` type of the symbolMap variable to `const`.
* Add Tizen API tables.

## 0.5.1

* Update the so list for Tizen 10.0 symgen.
Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import 'package:tizen_interop/6.0/tizen.dart';
// automatically when the `using` block ends.
String appName = using((Arena arena) {
Pointer<Pointer<Char>> ppStr = arena();
if (tizen.app_get_name(ppStr) == 0) {
if (tizenCapiAppfwAppCommon.app_get_name(ppStr) == 0) {
// The memory allocated by the Native API must be freed by the caller.
arena.using(ppStr.value, calloc.free);
return ppStr.value.toDartString();
Expand All @@ -44,15 +44,15 @@ String appName = using((Arena arena) {
using((Arena arena) {
Pointer<Char> pKey =
'tizen_interop_test_key_for_int'.toNativeChar(allocator: arena);
tizen.preference_set_int(pKey, 100);
tizenCapiAppfwPreference.preference_set_int(pKey, 100);
});

// Getting an integer value from the Native API.
int preferenceValue = using((Arena arena) {
Pointer<Char> pKey =
'tizen_interop_test_key_for_int'.toNativeChar(allocator: arena);
Pointer<Int> pValue = arena();
if (tizen.preference_get_int(pKey, pValue) == 0) {
if (tizenCapiAppfwPreference.preference_get_int(pKey, pValue) == 0) {
return pValue.value;
}
return 0;
Expand All @@ -61,22 +61,26 @@ int preferenceValue = using((Arena arena) {
// Getting a struct value from the Native API.
int freeMemory = using((Arena arena) {
Pointer<runtime_memory_info_s> pMemInfo = arena();
if (tizen.runtime_info_get_system_memory_info(pMemInfo) == 0) {
if (tizenCapiSystemRuntimeInfo.runtime_info_get_system_memory_info(pMemInfo) == 0) {
return pMemInfo.ref.free;
}
return 0;
});

// Both sync and async callbacks are supported as long as they are called on
// the same thread.
tizen.storage_foreach_device_supported(
tizenStorage.storage_foreach_device_supported(
Pointer.fromFunction(_storageDevice, false), nullptr);

// Callbacks that are called outside the current thread will cause the error:
// "Cannot invoke native callback outside an isolate".
// See the tizen_interop_callbacks package for a solution.
```

> **Note**: To find the correct getter for a specific API, please refer to the `doc/tizen{version}_api.md` file (e.g., `doc/tizen6.0_api.md`).

> **Warning**: Currently, the package is under development. All getters instance the same `TizenNative` class, so you can technically access APIs from other modules through any getter. However, doing so will cause a runtime warning. Please use the correct getter for each API to avoid future compatibility issues.


## Supported APIs

Expand Down
256 changes: 128 additions & 128 deletions configs/10.0/ffigen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,146 +5,146 @@ preamble: |

// ignore_for_file: type=lint, unused_element, unused_field

name: "Tizen100Native"
description: "Dart bindings for Tizen native APIs."
output: "../../lib/src/bindings/10.0/generated_bindings.dart"
name: 'Tizen100Native'
description: 'Dart bindings for Tizen native APIs.'
output: '../../lib/src/bindings/10.0/generated_bindings.dart'

llvm-path:
- "/usr/lib/llvm-12"
- '/usr/lib/llvm-12'

headers:
entry-points:
- "entrypoints.h"
- 'entrypoints.h'
include-directives:
- "**/account.h"
- "**/autofill_common.h"
- "**/autofill.h"
- "**/autofill_manager.h"
- "**/autofill_service.h"
- "**/bundle.h"
- "**/diagnostics.h"
- "**/inputmethod.h"
- "**/inputmethod_manager.h"
- "**/mtp.h"
- "**/multi_assistant_common.h"
- "**/multi_assistant.h"
- "**/oauth2.h"
- "**/peripheral_io.h"
- "**/privilege_information.h"
- "**/push-service.h"
- "**/stte.h"
- "**/stt.h"
- "**/sync_adapter.h"
- "**/sync_manager.h"
- "**/tbm_surface.h"
- "**/tizen_error.h"
- "**/tizen.h"
- "**/tizen_type.h"
- "**/trace.h"
- "**/ttse.h"
- "**/tts.h"
- "**/usb_host.h"
- "**/vce.h"
- "**/voice_control.h"
- "**/voice_control_manager.h"
- "**/vpn_service.h"
- "**/webauthn.h"
- "**/AL/*.h"
- "**/appcore-agent/*.h"
- "**/appfw/*.h"
- "**/asp/*.h"
- "**/badge/*.h"
- "**/calendar-service2/*.h"
- "**/cion/*.h"
- "**/ckm/ckmc/*.h"
- "**/contacts-svc/*.h"
- "**/content/*.h"
- "**/context-service/*.h"
- "**/device/*.h"
- "**/device-certificate-manager/*.h"
- "**/dlog/*.h"
- "**/dpm/*.h"
- "**/feedback/*.h"
- "**/iotcon/*.h"
- "**/location/*.h"
- "**/media/*.h"
- "**/media-content/*.h"
- "**/metadata-editor/*.h"
- "**/mmi/*.h"
- "**/network/*.h"
- "**/nnstreamer/*.h"
- "**/nntrainer/*.h"
- "**/notification/*.h"
- "**/notification-ex/api/*.h"
- "**/nsd/*.h"
- "**/openssl/*.h"
- "**/phonenumber-utils/*.h"
- "**/privacy-privilege-manager/*.h"
- "**/rpc-port/*.h"
- "**/sensor/*.h"
- "**/shortcut/*.h"
- "**/storage/*.h"
- "**/system/*.h"
- "**/tizen-core/*.h"
- "**/web/*.h"
- "**/wifi-direct/*.h"
- "**/yaca/*.h"
- '**/account.h'
- '**/autofill_common.h'
- '**/autofill.h'
- '**/autofill_manager.h'
- '**/autofill_service.h'
- '**/bundle.h'
- '**/diagnostics.h'
- '**/inputmethod.h'
- '**/inputmethod_manager.h'
- '**/mtp.h'
- '**/multi_assistant_common.h'
- '**/multi_assistant.h'
- '**/oauth2.h'
- '**/peripheral_io.h'
- '**/privilege_information.h'
- '**/push-service.h'
- '**/stte.h'
- '**/stt.h'
- '**/sync_adapter.h'
- '**/sync_manager.h'
- '**/tbm_surface.h'
- '**/tizen_error.h'
- '**/tizen.h'
- '**/tizen_type.h'
- '**/trace.h'
- '**/ttse.h'
- '**/tts.h'
- '**/usb_host.h'
- '**/vce.h'
- '**/voice_control.h'
- '**/voice_control_manager.h'
- '**/vpn_service.h'
- '**/webauthn.h'
- '**/AL/*.h'
- '**/appcore-agent/*.h'
- '**/appfw/*.h'
- '**/asp/*.h'
- '**/badge/*.h'
- '**/calendar-service2/*.h'
- '**/cion/*.h'
- '**/ckm/ckmc/*.h'
- '**/contacts-svc/*.h'
- '**/content/*.h'
- '**/context-service/*.h'
- '**/device/*.h'
- '**/device-certificate-manager/*.h'
- '**/dlog/*.h'
- '**/dpm/*.h'
- '**/feedback/*.h'
- '**/iotcon/*.h'
- '**/location/*.h'
- '**/media/*.h'
- '**/media-content/*.h'
- '**/metadata-editor/*.h'
- '**/mmi/*.h'
- '**/network/*.h'
- '**/nnstreamer/*.h'
- '**/nntrainer/*.h'
- '**/notification/*.h'
- '**/notification-ex/api/*.h'
- '**/nsd/*.h'
- '**/openssl/*.h'
- '**/phonenumber-utils/*.h'
- '**/privacy-privilege-manager/*.h'
- '**/rpc-port/*.h'
- '**/sensor/*.h'
- '**/shortcut/*.h'
- '**/storage/*.h'
- '**/system/*.h'
- '**/tizen-core/*.h'
- '**/web/*.h'
- '**/wifi-direct/*.h'
- '**/yaca/*.h'

compiler-opts:
- "-m32"
- "-Wno-incomplete-setjmp-declaration"
- "-I./rootstraps/10.0/usr/include/"
- "-I./rootstraps/10.0/usr/include/appcore-agent/"
- "-I./rootstraps/10.0/usr/include/appfw/"
- "-I./rootstraps/10.0/usr/include/asp/"
- "-I./rootstraps/10.0/usr/include/badge/"
- "-I./rootstraps/10.0/usr/include/calendar-service2/"
- "-I./rootstraps/10.0/usr/include/cion/"
- "-I./rootstraps/10.0/usr/include/ckm/"
- "-I./rootstraps/10.0/usr/include/contacts-svc/"
- "-I./rootstraps/10.0/usr/include/content/"
- "-I./rootstraps/10.0/usr/include/context-service/"
- "-I./rootstraps/10.0/usr/include/device-certificate-manager/"
- "-I./rootstraps/10.0/usr/include/dlog/"
- "-I./rootstraps/10.0/usr/include/feedback/"
- "-I./rootstraps/10.0/usr/include/iotcon/"
- "-I./rootstraps/10.0/usr/include/location/"
- "-I./rootstraps/10.0/usr/include/media/"
- "-I./rootstraps/10.0/usr/include/media-content/"
- "-I./rootstraps/10.0/usr/include/metadata-editor/"
- "-I./rootstraps/10.0/usr/include/mmi/"
- "-I./rootstraps/10.0/usr/include/network/"
- "-I./rootstraps/10.0/usr/include/nnstreamer/"
- "-I./rootstraps/10.0/usr/include/nntrainer/"
- "-I./rootstraps/10.0/usr/include/notification/"
- "-I./rootstraps/10.0/usr/include/notification-ex/api/"
- "-I./rootstraps/10.0/usr/include/nsd/"
- "-I./rootstraps/10.0/usr/include/openssl/"
- "-I./rootstraps/10.0/usr/include/phonenumber-utils/"
- "-I./rootstraps/10.0/usr/include/privacy-privilege-manager/"
- "-I./rootstraps/10.0/usr/include/rpc-port/"
- "-I./rootstraps/10.0/usr/include/sensor/"
- "-I./rootstraps/10.0/usr/include/shortcut/"
- "-I./rootstraps/10.0/usr/include/storage/"
- "-I./rootstraps/10.0/usr/include/system/"
- "-I./rootstraps/10.0/usr/include/tizen-core/"
- "-I./rootstraps/10.0/usr/include/web/"
- "-I./rootstraps/10.0/usr/include/wifi-direct/"
- "-I./rootstraps/10.0/usr/include/yaca/"
- '-m32'
- '-Wno-incomplete-setjmp-declaration'
- '-I./rootstraps/10.0/usr/include/'
- '-I./rootstraps/10.0/usr/include/appcore-agent/'
- '-I./rootstraps/10.0/usr/include/appfw/'
- '-I./rootstraps/10.0/usr/include/asp/'
- '-I./rootstraps/10.0/usr/include/badge/'
- '-I./rootstraps/10.0/usr/include/calendar-service2/'
- '-I./rootstraps/10.0/usr/include/cion/'
- '-I./rootstraps/10.0/usr/include/ckm/'
- '-I./rootstraps/10.0/usr/include/contacts-svc/'
- '-I./rootstraps/10.0/usr/include/content/'
- '-I./rootstraps/10.0/usr/include/context-service/'
- '-I./rootstraps/10.0/usr/include/device-certificate-manager/'
- '-I./rootstraps/10.0/usr/include/dlog/'
- '-I./rootstraps/10.0/usr/include/feedback/'
- '-I./rootstraps/10.0/usr/include/iotcon/'
- '-I./rootstraps/10.0/usr/include/location/'
- '-I./rootstraps/10.0/usr/include/media/'
- '-I./rootstraps/10.0/usr/include/media-content/'
- '-I./rootstraps/10.0/usr/include/metadata-editor/'
- '-I./rootstraps/10.0/usr/include/mmi/'
- '-I./rootstraps/10.0/usr/include/network/'
- '-I./rootstraps/10.0/usr/include/nnstreamer/'
- '-I./rootstraps/10.0/usr/include/nntrainer/'
- '-I./rootstraps/10.0/usr/include/notification/'
- '-I./rootstraps/10.0/usr/include/notification-ex/api/'
- '-I./rootstraps/10.0/usr/include/nsd/'
- '-I./rootstraps/10.0/usr/include/openssl/'
- '-I./rootstraps/10.0/usr/include/phonenumber-utils/'
- '-I./rootstraps/10.0/usr/include/privacy-privilege-manager/'
- '-I./rootstraps/10.0/usr/include/rpc-port/'
- '-I./rootstraps/10.0/usr/include/sensor/'
- '-I./rootstraps/10.0/usr/include/shortcut/'
- '-I./rootstraps/10.0/usr/include/storage/'
- '-I./rootstraps/10.0/usr/include/system/'
- '-I./rootstraps/10.0/usr/include/tizen-core/'
- '-I./rootstraps/10.0/usr/include/web/'
- '-I./rootstraps/10.0/usr/include/wifi-direct/'
- '-I./rootstraps/10.0/usr/include/yaca/'

# include EFL directories
- "-I./rootstraps/10.0/usr/include/ecore-imf-1/"
- "-I./rootstraps/10.0/usr/include/efl-1/"
- "-I./rootstraps/10.0/usr/include/eina-1/"
- "-I./rootstraps/10.0/usr/include/eina-1/eina/"
- "-I./rootstraps/10.0/usr/include/emile-1/"
- "-I./rootstraps/10.0/usr/include/eo-1/"
- "-I./rootstraps/10.0/usr/include/evas-1/"
- '-I./rootstraps/10.0/usr/include/ecore-imf-1/'
- '-I./rootstraps/10.0/usr/include/efl-1/'
- '-I./rootstraps/10.0/usr/include/eina-1/'
- '-I./rootstraps/10.0/usr/include/eina-1/eina/'
- '-I./rootstraps/10.0/usr/include/emile-1/'
- '-I./rootstraps/10.0/usr/include/eo-1/'
- '-I./rootstraps/10.0/usr/include/evas-1/'

# include glib directories
- "-I./rootstraps/10.0/usr/include/glib-2.0/"
- "-I./rootstraps/10.0/usr/lib/glib-2.0/include/"
- '-I./rootstraps/10.0/usr/include/glib-2.0/'
- '-I./rootstraps/10.0/usr/lib/glib-2.0/include/'

enums:
rename:
"_+(.*)": "$1"
'_+(.*)': '$1'
Loading